[llvm] r272254 - [llc] Remove exit-on-error flag from MIR tests (PR27770)
Diana Picus via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 9 03:31:05 PDT 2016
Author: rovka
Date: Thu Jun 9 05:31:05 2016
New Revision: 272254
URL: http://llvm.org/viewvc/llvm-project?rev=272254&view=rev
Log:
[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
Modified:
llvm/trunk/test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir
llvm/trunk/test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir
llvm/trunk/test/CodeGen/MIR/Generic/machine-function-missing-function.mir
llvm/trunk/test/CodeGen/MIR/Generic/machine-function-missing-name.mir
llvm/trunk/test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir
llvm/trunk/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-aliased.mir
llvm/trunk/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-immutable.mir
llvm/trunk/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir
llvm/trunk/tools/llc/llc.cpp
Modified: llvm/trunk/test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir?rev=272254&r1=272253&r2=272254&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir (original)
+++ llvm/trunk/test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir Thu Jun 9 05:31:05 2016
@@ -1,4 +1,4 @@
-# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s
+# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
--- |
Modified: llvm/trunk/test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir?rev=272254&r1=272253&r2=272254&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir (original)
+++ llvm/trunk/test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir Thu Jun 9 05:31:05 2016
@@ -1,4 +1,4 @@
-# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s
+# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
# This test ensures an error is reported if the embedded LLVM IR contains an
# error.
Modified: llvm/trunk/test/CodeGen/MIR/Generic/machine-function-missing-function.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MIR/Generic/machine-function-missing-function.mir?rev=272254&r1=272253&r2=272254&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/MIR/Generic/machine-function-missing-function.mir (original)
+++ llvm/trunk/test/CodeGen/MIR/Generic/machine-function-missing-function.mir Thu Jun 9 05:31:05 2016
@@ -1,4 +1,4 @@
-# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s
+# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
# This test ensures that an error is reported when the mir file has LLVM IR and
# one of the machine functions has a name that doesn't match any function in
# the LLVM IR.
Modified: llvm/trunk/test/CodeGen/MIR/Generic/machine-function-missing-name.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MIR/Generic/machine-function-missing-name.mir?rev=272254&r1=272253&r2=272254&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/MIR/Generic/machine-function-missing-name.mir (original)
+++ llvm/trunk/test/CodeGen/MIR/Generic/machine-function-missing-name.mir Thu Jun 9 05:31:05 2016
@@ -1,4 +1,4 @@
-# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s
+# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
# This test ensures that an error is reported when a machine function doesn't
# have a name attribute.
Modified: llvm/trunk/test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir?rev=272254&r1=272253&r2=272254&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir (original)
+++ llvm/trunk/test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir Thu Jun 9 05:31:05 2016
@@ -1,4 +1,4 @@
-# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s
+# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
# This test ensures that the machine function errors are reported correctly.
---
Modified: llvm/trunk/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-aliased.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-aliased.mir?rev=272254&r1=272253&r2=272254&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-aliased.mir (original)
+++ llvm/trunk/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-aliased.mir Thu Jun 9 05:31:05 2016
@@ -1,4 +1,4 @@
-# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s
+# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
--- |
Modified: llvm/trunk/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-immutable.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-immutable.mir?rev=272254&r1=272253&r2=272254&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-immutable.mir (original)
+++ llvm/trunk/test/CodeGen/MIR/X86/spill-slot-fixed-stack-object-immutable.mir Thu Jun 9 05:31:05 2016
@@ -1,4 +1,4 @@
-# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s
+# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
--- |
Modified: llvm/trunk/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir?rev=272254&r1=272253&r2=272254&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir (original)
+++ llvm/trunk/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir Thu Jun 9 05:31:05 2016
@@ -1,4 +1,4 @@
-# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s
+# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
--- |
define i32 @test(i32 %a) {
Modified: llvm/trunk/tools/llc/llc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=272254&r1=272253&r2=272254&view=diff
==============================================================================
--- llvm/trunk/tools/llc/llc.cpp (original)
+++ llvm/trunk/tools/llc/llc.cpp Thu Jun 9 05:31:05 2016
@@ -260,10 +260,8 @@ static int compileModule(char **argv, LL
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) {
More information about the llvm-commits
mailing list