1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00

Fix one round of implicit conversions found by g++5.

This commit is contained in:
Benjamin Kramer 2020-01-29 01:49:54 +01:00
parent 3b91c078ed
commit 3e6e191872
2 changed files with 12 additions and 9 deletions

View File

@ -67,7 +67,7 @@ void InterfaceFile::addParentUmbrella(const Target &Target_, StringRef Parent) {
return; return;
} }
ParentUmbrellas.emplace(Iter, Target_, Parent); ParentUmbrellas.emplace(Iter, Target_, std::string(Parent));
return; return;
} }

View File

@ -279,11 +279,11 @@ namespace options {
} else if (opt == "disable-verify") { } else if (opt == "disable-verify") {
DisableVerify = true; DisableVerify = true;
} else if (opt.startswith("sample-profile=")) { } else if (opt.startswith("sample-profile=")) {
sample_profile = opt.substr(strlen("sample-profile=")); sample_profile = std::string(opt.substr(strlen("sample-profile=")));
} else if (opt == "cs-profile-generate") { } else if (opt == "cs-profile-generate") {
cs_pgo_gen = true; cs_pgo_gen = true;
} else if (opt.startswith("cs-profile-path=")) { } else if (opt.startswith("cs-profile-path=")) {
cs_profile_path = opt.substr(strlen("cs-profile-path=")); cs_profile_path = std::string(opt.substr(strlen("cs-profile-path=")));
} else if (opt == "new-pass-manager") { } else if (opt == "new-pass-manager") {
new_pass_manager = true; new_pass_manager = true;
} else if (opt == "debug-pass-manager") { } else if (opt == "debug-pass-manager") {
@ -291,17 +291,18 @@ namespace options {
} else if (opt == "whole-program-visibility") { } else if (opt == "whole-program-visibility") {
whole_program_visibility = true; whole_program_visibility = true;
} else if (opt.startswith("dwo_dir=")) { } else if (opt.startswith("dwo_dir=")) {
dwo_dir = opt.substr(strlen("dwo_dir=")); dwo_dir = std::string(opt.substr(strlen("dwo_dir=")));
} else if (opt.startswith("opt-remarks-filename=")) { } else if (opt.startswith("opt-remarks-filename=")) {
RemarksFilename = opt.substr(strlen("opt-remarks-filename=")); RemarksFilename =
std::string(opt.substr(strlen("opt-remarks-filename=")));
} else if (opt.startswith("opt-remarks-passes=")) { } else if (opt.startswith("opt-remarks-passes=")) {
RemarksPasses = opt.substr(strlen("opt-remarks-passes=")); RemarksPasses = std::string(opt.substr(strlen("opt-remarks-passes=")));
} else if (opt == "opt-remarks-with-hotness") { } else if (opt == "opt-remarks-with-hotness") {
RemarksWithHotness = true; RemarksWithHotness = true;
} else if (opt.startswith("opt-remarks-format=")) { } else if (opt.startswith("opt-remarks-format=")) {
RemarksFormat = opt.substr(strlen("opt-remarks-format=")); RemarksFormat = std::string(opt.substr(strlen("opt-remarks-format=")));
} else if (opt.startswith("stats-file=")) { } else if (opt.startswith("stats-file=")) {
stats_file = opt.substr(strlen("stats-file=")); stats_file = std::string(opt.substr(strlen("stats-file=")));
} else { } else {
// Save this option to pass to the code generator. // Save this option to pass to the code generator.
// ParseCommandLineOptions() expects argv[0] to be program name. Lazily // ParseCommandLineOptions() expects argv[0] to be program name. Lazily
@ -683,7 +684,9 @@ static void getThinLTOOldAndNewSuffix(std::string &OldSuffix,
assert(options::thinlto_object_suffix_replace.empty() || assert(options::thinlto_object_suffix_replace.empty() ||
options::thinlto_object_suffix_replace.find(";") != StringRef::npos); options::thinlto_object_suffix_replace.find(";") != StringRef::npos);
StringRef SuffixReplace = options::thinlto_object_suffix_replace; StringRef SuffixReplace = options::thinlto_object_suffix_replace;
std::tie(OldSuffix, NewSuffix) = SuffixReplace.split(';'); auto Split = SuffixReplace.split(';');
OldSuffix = Split.first;
NewSuffix = Split.second;
} }
/// Given the original \p Path to an output file, replace any filename /// Given the original \p Path to an output file, replace any filename