Have SystemZSelectionDAGInfo constructor take a DataLayout rather
[oota-llvm.git] / lib / Analysis / Analysis.cpp
index 7b6397679d76ae86f48fb285ec193a97d6aa7bcf..ade940a7d300c9cca8689dd43e3f6f5aeaafed46 100644 (file)
@@ -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);
 
@@ -87,7 +88,7 @@ LLVMBool LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action,
     report_fatal_error("Broken module found, compilation aborted!");
 
   if (OutMessages)
-    *OutMessages = strndup(MsgsOS.str().data(), MsgsOS.str().size());
+    *OutMessages = strdup(MsgsOS.str().c_str());
 
   return Result;
 }