summaryrefslogtreecommitdiff
path: root/unittests/ExecutionEngine
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
commit8dd8d5c2b2ad0f9dd1ca01c0a7d8ebac57b8537d (patch)
tree7da91c52380a71a92a895b0c172ae28b83fb6011 /unittests/ExecutionEngine
parenteca517deaa890b1658ed0452704f398ce80e47b8 (diff)
Revert "Introduce a string_ostream string builder facilty"
Temporarily back out commits r211749, r211752 and r211754. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ExecutionEngine')
-rw-r--r--unittests/ExecutionEngine/JIT/JITTest.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/unittests/ExecutionEngine/JIT/JITTest.cpp b/unittests/ExecutionEngine/JIT/JITTest.cpp
index aa79bdc7301..817d207c2dc 100644
--- a/unittests/ExecutionEngine/JIT/JITTest.cpp
+++ b/unittests/ExecutionEngine/JIT/JITTest.cpp
@@ -70,9 +70,9 @@ Function *makeReturnGlobal(std::string Name, GlobalVariable *G, Module *M) {
}
std::string DumpFunction(const Function *F) {
- string_ostream Result;
- Result << "" << *F;
- return Result.str();
+ std::string Result;
+ raw_string_ostream(Result) << "" << *F;
+ return Result;
}
class RecordingJITMemoryManager : public JITMemoryManager {
@@ -170,9 +170,10 @@ bool LoadAssemblyInto(Module *M, const char *assembly) {
SMDiagnostic Error;
bool success =
nullptr != ParseAssemblyString(assembly, M, Error, M->getContext());
- string_ostream errMsg;
- Error.print("", errMsg);
- EXPECT_TRUE(success) << errMsg.str();
+ std::string errMsg;
+ raw_string_ostream os(errMsg);
+ Error.print("", os);
+ EXPECT_TRUE(success) << os.str();
return success;
}