xref: /aosp_15_r20/external/llvm/test/LTO/X86/strip-debug-info.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: not llvm-lto -lto-strip-invalid-debug-info=false \
2*9880d681SAndroid Build Coastguard Worker; RUN:     -o %t.o %S/Inputs/strip-debug-info.bc 2>&1 | \
3*9880d681SAndroid Build Coastguard Worker; RUN:     FileCheck %s -allow-empty -check-prefix=CHECK-ERR
4*9880d681SAndroid Build Coastguard Worker; RUN: llvm-lto -lto-strip-invalid-debug-info=true \
5*9880d681SAndroid Build Coastguard Worker; RUN:     -exported-symbol foo -exported-symbol _foo \
6*9880d681SAndroid Build Coastguard Worker; RUN:     -o %t.o %S/Inputs/strip-debug-info.bc 2>&1 | \
7*9880d681SAndroid Build Coastguard Worker; RUN:     FileCheck %s -allow-empty -check-prefix=CHECK-WARN
8*9880d681SAndroid Build Coastguard Worker; RUN: llvm-nm %t.o | FileCheck %s
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker; CHECK-ERR: Broken module found, compilation aborted
11*9880d681SAndroid Build Coastguard Worker; CHECK-WARN: Invalid debug info found, debug info will be stripped
12*9880d681SAndroid Build Coastguard Worker; CHECK: foo
13*9880d681SAndroid Build Coastguard Workerdefine void @foo() {
14*9880d681SAndroid Build Coastguard Worker  ret void
15*9880d681SAndroid Build Coastguard Worker}
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!0}
18*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!1}
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker!0 = !{i32 2, !"Debug Info Version", i32 3}
21*9880d681SAndroid Build Coastguard Worker!1 = !DIFile(filename: "broken", directory: "")
22