llvm-project/llvm/test/LTO/empty-triple.ll
Feng Zou 33757cdda8
[LTO] Fix the issue of resetting the triple to default when it's empty (#157829)
The empty triple is passed to lookupTarget function and it's not set to
default one. This issue is exposed after changes in
https://github.com/llvm/llvm-project/pull/157591.
2025-09-11 10:43:25 +08:00

13 lines
313 B
LLVM

; RUN: llvm-as < %s >%t1
; RUN: llvm-lto -exported-symbol=main -filetype=asm -o - %t1 2>&1 | FileCheck %s
; The test is to check the triple is set to default one when it's empty.
; Otherwise, an error will be raised by llvm-lto.
; CHECK-LABEL: main
; CHECK-NOT: error
define void @main() {
entry:
ret void
}