diff options
Diffstat (limited to 'llvm/tools/llvm-ml/llvm-ml.cpp')
-rw-r--r-- | llvm/tools/llvm-ml/llvm-ml.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/tools/llvm-ml/llvm-ml.cpp b/llvm/tools/llvm-ml/llvm-ml.cpp index ae58b0d..cda86e7 100644 --- a/llvm/tools/llvm-ml/llvm-ml.cpp +++ b/llvm/tools/llvm-ml/llvm-ml.cpp @@ -325,7 +325,10 @@ int llvm_ml_main(int Argc, char **Argv, const llvm::ToolContext &) { std::unique_ptr<MCSubtargetInfo> STI( TheTarget->createMCSubtargetInfo(TheTriple, /*CPU=*/"", /*Features=*/"")); - assert(STI && "Unable to create subtarget info!"); + if (!STI) { + WithColor::error(errs(), ProgName) << "unable to create subtarget info\n"; + exit(1); + } // FIXME: This is not pretty. MCContext has a ptr to MCObjectFileInfo and // MCObjectFileInfo needs a MCContext reference in order to initialize itself. |