summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBlockPlacement.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-06-26 22:52:05 +0000
committerAlp Toker <alp@nuanti.com>2014-06-26 22:52:05 +0000
commite69170a11079504e1b20ec79296925f295dc01c0 (patch)
tree7c415eb6c14f0afb0e97e42d6ba2579dd897fb3a /llvm/lib/CodeGen/MachineBlockPlacement.cpp
parent11c6f6165b76a42da7eaf4514e419be397d7fc44 (diff)
downloadbcm5719-llvm-e69170a11079504e1b20ec79296925f295dc01c0.tar.gz
bcm5719-llvm-e69170a11079504e1b20ec79296925f295dc01c0.zip
Revert "Introduce a string_ostream string builder facilty"
Temporarily back out commits r211749, r211752 and r211754. llvm-svn: 211814
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBlockPlacement.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp
index 891f605e2a1..74af1e2d64b 100644
--- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp
+++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp
@@ -264,19 +264,23 @@ INITIALIZE_PASS_END(MachineBlockPlacement, "block-placement2",
///
/// Only used by debug logging.
static std::string getBlockName(MachineBasicBlock *BB) {
- string_ostream OS;
+ std::string Result;
+ raw_string_ostream OS(Result);
OS << "BB#" << BB->getNumber()
<< " (derived from LLVM BB '" << BB->getName() << "')";
- return OS.str();
+ OS.flush();
+ return Result;
}
/// \brief Helper to print the number of a MBB.
///
/// Only used by debug logging.
static std::string getBlockNum(MachineBasicBlock *BB) {
- string_ostream OS;
+ std::string Result;
+ raw_string_ostream OS(Result);
OS << "BB#" << BB->getNumber();
- return OS.str();
+ OS.flush();
+ return Result;
}
#endif
OpenPOWER on IntegriCloud