diff options
Diffstat (limited to 'lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | lib/CodeGen/MachineBlockPlacement.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/CodeGen/MachineBlockPlacement.cpp b/lib/CodeGen/MachineBlockPlacement.cpp index 74af1e2d64..891f605e2a 100644 --- a/lib/CodeGen/MachineBlockPlacement.cpp +++ b/lib/CodeGen/MachineBlockPlacement.cpp @@ -264,23 +264,19 @@ INITIALIZE_PASS_END(MachineBlockPlacement, "block-placement2", /// /// Only used by debug logging. static std::string getBlockName(MachineBasicBlock *BB) { - std::string Result; - raw_string_ostream OS(Result); + string_ostream OS; OS << "BB#" << BB->getNumber() << " (derived from LLVM BB '" << BB->getName() << "')"; - OS.flush(); - return Result; + return OS.str(); } /// \brief Helper to print the number of a MBB. /// /// Only used by debug logging. static std::string getBlockNum(MachineBasicBlock *BB) { - std::string Result; - raw_string_ostream OS(Result); + string_ostream OS; OS << "BB#" << BB->getNumber(); - OS.flush(); - return Result; + return OS.str(); } #endif |