1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

Address implicit conversions detected by g++ 5 only.

This commit is contained in:
Benjamin Kramer 2020-01-29 01:01:09 +01:00
parent 5313b54c46
commit 633cdf3dc1
2 changed files with 3 additions and 3 deletions

View File

@ -184,7 +184,7 @@ struct TimeTraceProfiler {
std::vector<NameAndCountAndDurationType> SortedTotals;
SortedTotals.reserve(AllCountAndTotalPerName.size());
for (const auto &Total : AllCountAndTotalPerName)
SortedTotals.emplace_back(Total.getKey(), Total.getValue());
SortedTotals.emplace_back(std::string(Total.getKey()), Total.getValue());
llvm::sort(SortedTotals.begin(), SortedTotals.end(),
[](const NameAndCountAndDurationType &A,

View File

@ -2601,7 +2601,7 @@ static void emitMatchRegisterName(CodeGenTarget &Target, Record *AsmParser,
if (Reg.TheDef->getValueAsString("AsmName").empty())
continue;
Matches.emplace_back(Reg.TheDef->getValueAsString("AsmName"),
Matches.emplace_back(std::string(Reg.TheDef->getValueAsString("AsmName")),
"return " + utostr(Reg.EnumValue) + ";");
}
@ -2633,7 +2633,7 @@ static void emitMatchRegisterAltName(CodeGenTarget &Target, Record *AsmParser,
if (AltName.empty())
continue;
Matches.emplace_back(AltName,
Matches.emplace_back(std::string(AltName),
"return " + utostr(Reg.EnumValue) + ";");
}
}