mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-11 23:19:21 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241862 91177308-0d34-0410-b5e6-96231b3b80d8
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
|
|
...
|