1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[NFC] Outliner label name clean up.

Just simplifying how the label name is generated while using
std::to_string instead of Twine.

Differential Revision: https://reviews.llvm.org/D79464
This commit is contained in:
Puyan Lotfi 2020-05-05 23:25:13 -04:00
parent 095011b168
commit 8c3e5ac746

View File

@ -1110,13 +1110,10 @@ MachineFunction *MachineOutliner::createOutlinedFunction(
// Create the function name. This should be unique.
// FIXME: We should have a better naming scheme. This should be stable,
// regardless of changes to the outliner's cost model/traversal order.
std::string FunctionName;
std::string FunctionName = "OUTLINED_FUNCTION_";
if (OutlineRepeatedNum > 0)
FunctionName = ("OUTLINED_FUNCTION_" + Twine(OutlineRepeatedNum + 1) + "_" +
Twine(Name))
.str();
else
FunctionName = ("OUTLINED_FUNCTION_" + Twine(Name)).str();
FunctionName += std::to_string(OutlineRepeatedNum + 1) + "_";
FunctionName += std::to_string(Name);
// Create the function using an IR-level function.
LLVMContext &C = M.getContext();