summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2016-06-09 10:31:05 +0000
committerDiana Picus <diana.picus@linaro.org>2016-06-09 10:31:05 +0000
commitdb2aff0ab48a47ffc46fe47ccffb51948ee6351d (patch)
treee21ec5849e5dd8dac1095a11d791f60b192904c4 /llvm/tools
parent4180f34ecb417e1136745b8846a94e0abadb0888 (diff)
downloadbcm5719-llvm-db2aff0ab48a47ffc46fe47ccffb51948ee6351d.tar.gz
bcm5719-llvm-db2aff0ab48a47ffc46fe47ccffb51948ee6351d.zip
[llc] Remove exit-on-error flag from MIR tests (PR27770)
This is made possible by removing an assert in llc that assumed MIRParser::parseLLVMModule would exit on error. MIRParser's documentation states that it returns null if a parsing error occurs, so there's no reason to assert. We can instead just fall through to where the check for a module is performed and exit if it is null. This commit is part of the clean-up after r269655. Fixes PR27770 Differential Revision: http://reviews.llvm.org/D20371 llvm-svn: 272254
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llc/llc.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index 9cca40a15c5..981a6c34de1 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -260,10 +260,8 @@ static int compileModule(char **argv, LLVMContext &Context) {
if (!SkipModule) {
if (StringRef(InputFilename).endswith_lower(".mir")) {
MIR = createMIRParserFromFile(InputFilename, Err, Context);
- if (MIR) {
+ if (MIR)
M = MIR->parseLLVMModule();
- assert(M && "parseLLVMModule should exit on failure");
- }
} else
M = parseIRFile(InputFilename, Err, Context);
if (!M) {
OpenPOWER on IntegriCloud