diff options
Diffstat (limited to 'test/LTO/X86/strip-debug-info.ll')
-rw-r--r-- | test/LTO/X86/strip-debug-info.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/LTO/X86/strip-debug-info.ll b/test/LTO/X86/strip-debug-info.ll new file mode 100644 index 00000000000..265a34b9c97 --- /dev/null +++ b/test/LTO/X86/strip-debug-info.ll @@ -0,0 +1,20 @@ +; RUN: not llvm-lto -lto-strip-invalid-debug-info=false \ +; RUN: -o %t.o %S/Inputs/strip-debug-info.bc 2>&1 | \ +; RUN: FileCheck %s -allow-empty -check-prefix=CHECK-ERR +; RUN: llvm-lto -lto-strip-invalid-debug-info=true -exported-symbol _foo \ +; RUN: -o %t.o %S/Inputs/strip-debug-info.bc 2>&1 | \ +; RUN: FileCheck %s -allow-empty -check-prefix=CHECK-WARN +; RUN: llvm-nm %t.o | FileCheck %s + +; CHECK-ERR: Broken module found, compilation aborted +; CHECK-WARN: Invalid debug info found, debug info will be stripped +; CHECK: foo +define void @foo() { + ret void +} + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = !DIFile(filename: "broken", directory: "") |