This commit adds a new error which is reported when the MIR Parser encounters a machine function without any machine basic blocks. The machine verifier expects that the machine functions have at least one MBB, and this error will prevent machine functions without MBBs from reaching the machine verifier and crashing with an assertion. llvm-svn: 241862
67 lines
1.1 KiB
YAML
67 lines
1.1 KiB
YAML
# RUN: llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s | FileCheck %s
|
|
# This test ensures that the MIR parser parses machine functions correctly.
|
|
|
|
--- |
|
|
|
|
define i32 @foo() {
|
|
ret i32 0
|
|
}
|
|
|
|
define i32 @bar() {
|
|
ret i32 0
|
|
}
|
|
|
|
define i32 @func() {
|
|
ret i32 0
|
|
}
|
|
|
|
define i32 @func2() {
|
|
ret i32 0
|
|
}
|
|
|
|
...
|
|
---
|
|
# CHECK: name: foo
|
|
# CHECK-NEXT: alignment:
|
|
# CHECK-NEXT: exposesReturnsTwice: false
|
|
# CHECK-NEXT: hasInlineAsm: false
|
|
# CHECK: ...
|
|
name: foo
|
|
body:
|
|
- id: 0
|
|
...
|
|
---
|
|
# CHECK: name: bar
|
|
# CHECK-NEXT: alignment:
|
|
# CHECK-NEXT: exposesReturnsTwice: false
|
|
# CHECK-NEXT: hasInlineAsm: false
|
|
# CHECK: ...
|
|
name: bar
|
|
body:
|
|
- id: 0
|
|
...
|
|
---
|
|
# CHECK: name: func
|
|
# CHECK-NEXT: alignment: 8
|
|
# CHECK-NEXT: exposesReturnsTwice: false
|
|
# CHECK-NEXT: hasInlineAsm: false
|
|
# CHECK: ...
|
|
name: func
|
|
alignment: 8
|
|
body:
|
|
- id: 0
|
|
...
|
|
---
|
|
# CHECK: name: func2
|
|
# CHECK-NEXT: alignment: 16
|
|
# CHECK-NEXT: exposesReturnsTwice: true
|
|
# CHECK-NEXT: hasInlineAsm: true
|
|
# CHECK: ...
|
|
name: func2
|
|
alignment: 16
|
|
exposesReturnsTwice: true
|
|
hasInlineAsm: true
|
|
body:
|
|
- id: 0
|
|
...
|