summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/LLVMContext.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/IR/LLVMContext.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/IR/LLVMContext.cpp')
-rw-r--r--llvm/lib/IR/LLVMContext.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp
index 201b278285c..de825f00b20 100644
--- a/llvm/lib/IR/LLVMContext.cpp
+++ b/llvm/lib/IR/LLVMContext.cpp
@@ -164,22 +164,23 @@ void LLVMContext::diagnose(const DiagnosticInfo &DI) {
}
// Otherwise, print the message with a prefix based on the severity.
- string_ostream Msg;
- DiagnosticPrinterRawOStream DP(Msg);
+ std::string MsgStorage;
+ raw_string_ostream Stream(MsgStorage);
+ DiagnosticPrinterRawOStream DP(Stream);
DI.print(DP);
-
+ Stream.flush();
switch (DI.getSeverity()) {
case DS_Error:
- errs() << "error: " << Msg.str() << "\n";
+ errs() << "error: " << MsgStorage << "\n";
exit(1);
case DS_Warning:
- errs() << "warning: " << Msg.str() << "\n";
+ errs() << "warning: " << MsgStorage << "\n";
break;
case DS_Remark:
- errs() << "remark: " << Msg.str() << "\n";
+ errs() << "remark: " << MsgStorage << "\n";
break;
case DS_Note:
- errs() << "note: " << Msg.str() << "\n";
+ errs() << "note: " << MsgStorage << "\n";
break;
}
}
OpenPOWER on IntegriCloud