diff options
Diffstat (limited to 'llvm/test')
4 files changed, 18 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/MIR/function-missing-machine-function.mir b/llvm/test/CodeGen/MIR/function-missing-machine-function.mir new file mode 100644 index 00000000000..71b5b284534 --- /dev/null +++ b/llvm/test/CodeGen/MIR/function-missing-machine-function.mir @@ -0,0 +1,13 @@ +# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s +# This test verifies that an error is reported when a MIR file has some +# function but is missing a corresponding machine function. + +# CHECK: no machine function information for function 'foo' in the MIR file + +--- | + + define i32 @foo() { + ret i32 0 + } + +... diff --git a/llvm/test/CodeGen/MIR/llvm-ir-error-reported.mir b/llvm/test/CodeGen/MIR/llvm-ir-error-reported.mir index 013b28cd789..3508c341c44 100644 --- a/llvm/test/CodeGen/MIR/llvm-ir-error-reported.mir +++ b/llvm/test/CodeGen/MIR/llvm-ir-error-reported.mir @@ -4,7 +4,7 @@ --- | - ; CHECK: [[@LINE+3]]:15: error: use of undefined value '%a' + ; CHECK: [[@LINE+3]]:15: use of undefined value '%a' define i32 @foo(i32 %x, i32 %y) { %z = alloca i32, align 4 store i32 %a, i32* %z, align 4 diff --git a/llvm/test/CodeGen/MIR/llvmIR.mir b/llvm/test/CodeGen/MIR/llvmIR.mir index 7a7b46b6263..4d7fde240c5 100644 --- a/llvm/test/CodeGen/MIR/llvmIR.mir +++ b/llvm/test/CodeGen/MIR/llvmIR.mir @@ -30,3 +30,6 @@ } ... +--- +name: foo +... diff --git a/llvm/test/CodeGen/MIR/machine-function-missing-name.mir b/llvm/test/CodeGen/MIR/machine-function-missing-name.mir index 54668f1a5ef..b16156e54bd 100644 --- a/llvm/test/CodeGen/MIR/machine-function-missing-name.mir +++ b/llvm/test/CodeGen/MIR/machine-function-missing-name.mir @@ -14,7 +14,7 @@ ... --- -# CHECK: [[@LINE+1]]:1: error: missing required key 'name' +# CHECK: [[@LINE+1]]:1: missing required key 'name' nme: foo ... --- |

