Files
llvm-project/llvm/test/CodeGen/MIR/Generic/machine-function-empty-name.mir
Fuad Ismail 8879ff136c Support unnamed functions in MIR parser (#183018)
In this PR, unnamed machine functions in an MIR file are associated with
anonymous functions in the embedded LLVM IR according to the order in
which they are specified. If there are more unnamed machine functions
then there are LLVM IR functions, the parsing will fail by reporting the
original error message of `function ‘’ isn’t defined in the provided
LLVM IR`.

Closes #36511
2026-03-03 10:10:08 +00:00

32 lines
500 B
YAML

# RUN: llc -run-pass=none -o - %s | FileCheck %s
# This test ensures that the MIR parser accepts files with unnamed functions.
--- |
; CHECK: define void @0
define void @0() {
; CHECK: ret void
ret void
}
; CHECK: define void @foo
define void @foo() {
; CHECK: ret void
ret void
}
; CHECK: define i32 @1
define i32 @1() {
; CHECK: ret i32 0
ret i32 0
}
...
---
# CHECK: name: ''
name: ''
---
# CHECK: name: foo
name: foo
---
# CHECK: name: ''
name: ''
...