aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOutliner.cpp
diff options
context:
space:
mode:
authorPuyan Lotfi <puyan@puyan.org>2020-05-05 23:25:13 -0400
committerPuyan Lotfi <puyan@puyan.org>2020-05-05 23:27:46 -0400
commit0c4aab27b3da05dd1b0c0c39472525325fda5e23 (patch)
treeff44ea5d0358268c3ce4c2bbc9586d29638ea404 /llvm/lib/CodeGen/MachineOutliner.cpp
parentb1b86d1c28150d3e54e5d33072b4afb6011b7ab0 (diff)
downloadllvm-0c4aab27b3da05dd1b0c0c39472525325fda5e23.zip
llvm-0c4aab27b3da05dd1b0c0c39472525325fda5e23.tar.gz
llvm-0c4aab27b3da05dd1b0c0c39472525325fda5e23.tar.bz2
[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
Diffstat (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOutliner.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index dd1dd2c..8bd02f0 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -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();