We don't need to use llvm_report_error, this interface can deal with errors
(although we don't get a very good error message).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75864 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp
index de29365..0f33ee3 100644
--- a/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/lib/CodeGen/LLVMTargetMachine.cpp
@@ -23,7 +23,6 @@
#include "llvm/Target/TargetRegistry.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormattedStream.h"
using namespace llvm;
@@ -100,7 +99,8 @@
formatted_raw_ostream &Out) {
FunctionPass *Printer = getTarget().createAsmPrinter(Out, *this, Verbose);
if (!Printer)
- llvm_report_error("unable to create assembly printer");
+ return true;
+
PM.add(Printer);
return false;
}