summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/Analysis.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/Analysis/Analysis.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/Analysis/Analysis.cpp')
-rw-r--r--llvm/lib/Analysis/Analysis.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/Analysis.cpp b/llvm/lib/Analysis/Analysis.cpp
index 907203c571e..ade940a7d30 100644
--- a/llvm/lib/Analysis/Analysis.cpp
+++ b/llvm/lib/Analysis/Analysis.cpp
@@ -75,7 +75,8 @@ void LLVMInitializeAnalysis(LLVMPassRegistryRef R) {
LLVMBool LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action,
char **OutMessages) {
raw_ostream *DebugOS = Action != LLVMReturnStatusAction ? &errs() : nullptr;
- string_ostream MsgsOS;
+ std::string Messages;
+ raw_string_ostream MsgsOS(Messages);
LLVMBool Result = verifyModule(*unwrap(M), OutMessages ? &MsgsOS : DebugOS);
@@ -86,10 +87,8 @@ LLVMBool LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action,
if (Action == LLVMAbortProcessAction && Result)
report_fatal_error("Broken module found, compilation aborted!");
- if (OutMessages) {
- MsgsOS << '\0';
- *OutMessages = strdup(MsgsOS.str().data());
- }
+ if (OutMessages)
+ *OutMessages = strdup(MsgsOS.str().c_str());
return Result;
}
OpenPOWER on IntegriCloud