diff options
author | Renato Golin <renato.golin@linaro.org> | 2016-05-13 15:37:46 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2016-05-13 15:37:46 +0000 |
commit | d7a64a5b231b8094184ca2d0bc1874addccf703e (patch) | |
tree | a70481b53c77eb121399d337217722c39f2c5616 /llvm/test/CodeGen/MIR/Generic | |
parent | 631e5f23f98eff23abd3b1b62e812053a7cd6a6a (diff) | |
download | bcm5719-llvm-d7a64a5b231b8094184ca2d0bc1874addccf703e.tar.gz bcm5719-llvm-d7a64a5b231b8094184ca2d0bc1874addccf703e.zip |
[llc] New diagnostic handler
Without a diagnostic handler installed, llc's behaviour is to exit on the first
error that it encounters. This is very different from the behaviour of clang
and other front ends, which try to gather as many errors as possible before
exiting.
This commit adds a diagnostic handler to llc, allowing it to find and report
more than one error. The old behaviour is preserved under a flag (-exit-on-error).
Some of the tests fail with the new diagnostic handler, so they have to use the
new flag in order to run under the previous behaviour. Some of these are known
bugs, others need further investigation. Ideally, we should fix the tests and
remove the flag at some point in the future.
Patch by Diana Picus.
llvm-svn: 269428
Diffstat (limited to 'llvm/test/CodeGen/MIR/Generic')
5 files changed, 5 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir b/llvm/test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir index 576de4bd9dc..04e5606e87f 100644 --- a/llvm/test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir +++ b/llvm/test/CodeGen/MIR/Generic/invalid-jump-table-kind.mir @@ -1,4 +1,4 @@ -# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s +# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s --- | diff --git a/llvm/test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir b/llvm/test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir index 3508c341c44..e404b26b687 100644 --- a/llvm/test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir +++ b/llvm/test/CodeGen/MIR/Generic/llvm-ir-error-reported.mir @@ -1,4 +1,4 @@ -# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s +# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s # This test ensures an error is reported if the embedded LLVM IR contains an # error. diff --git a/llvm/test/CodeGen/MIR/Generic/machine-function-missing-function.mir b/llvm/test/CodeGen/MIR/Generic/machine-function-missing-function.mir index 6800f872432..128a98720c2 100644 --- a/llvm/test/CodeGen/MIR/Generic/machine-function-missing-function.mir +++ b/llvm/test/CodeGen/MIR/Generic/machine-function-missing-function.mir @@ -1,4 +1,4 @@ -# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s +# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -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. diff --git a/llvm/test/CodeGen/MIR/Generic/machine-function-missing-name.mir b/llvm/test/CodeGen/MIR/Generic/machine-function-missing-name.mir index f65b77880e9..150b923c424 100644 --- a/llvm/test/CodeGen/MIR/Generic/machine-function-missing-name.mir +++ b/llvm/test/CodeGen/MIR/Generic/machine-function-missing-name.mir @@ -1,4 +1,4 @@ -# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s +# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -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. diff --git a/llvm/test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir b/llvm/test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir index be84161b563..57f3834f29f 100644 --- a/llvm/test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir +++ b/llvm/test/CodeGen/MIR/Generic/machine-function-redefinition-error.mir @@ -1,4 +1,4 @@ -# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s +# RUN: not llc -start-after branch-folder -stop-after branch-folder -exit-on-error -o /dev/null %s 2>&1 | FileCheck %s # This test ensures that the machine function errors are reported correctly. --- |