diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-02-14 01:57:59 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-02-14 01:57:59 +0000 |
commit | 177585d1d9bfb1589b5281148bd6c6e2f09f66a3 (patch) | |
tree | 6bf4594e09b940425a71b70342c64590525bea7d /llvm/test/DebugInfo/empty.ll | |
parent | 0d403d22b0a62ce5588276d042c91b840a0f7eab (diff) | |
download | bcm5719-llvm-177585d1d9bfb1589b5281148bd6c6e2f09f66a3.tar.gz bcm5719-llvm-177585d1d9bfb1589b5281148bd6c6e2f09f66a3.zip |
DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded
Recommitting r201351 and r201355 (reverted in r201351 and r201355)
We weren't emitting the an empty (header only) line table when the line
table was empty - this made the DWARF invalid (the compile unit would
point to the zero-size debug_lines section where there should've been an
empty line table but there was nothing at all). Fix that, and as a
consequence this works around/addresses PR18809.
llvm-svn: 201380
Diffstat (limited to 'llvm/test/DebugInfo/empty.ll')
-rw-r--r-- | llvm/test/DebugInfo/empty.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/empty.ll b/llvm/test/DebugInfo/empty.ll new file mode 100644 index 00000000000..9f4836ff0d5 --- /dev/null +++ b/llvm/test/DebugInfo/empty.ll @@ -0,0 +1,20 @@ +; RUN: llc %s -o %t -filetype=obj +; RUN: llvm-dwarfdump -debug-dump=line %t | FileCheck %s + +; PR18809 +; XFAIL: cygwin,mingw32 + +; Expect no line table entry since there are no functions and file references in this compile unit +; CHECK: .debug_line contents: +; CHECK: Line table prologue: +; CHECK: total_length: 0x00000019 +; CHECK-NOT: file_names[ + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!5} + +!0 = metadata !{i32 720913, metadata !4, i32 12, metadata !"clang version 3.1 (trunk 143523)", i1 true, metadata !"", i32 0, metadata !2, metadata !2, metadata !2, metadata !2, null, metadata !""} ; [ DW_TAG_compile_unit ] +!2 = metadata !{} +!3 = metadata !{i32 786473, metadata !4} ; [ DW_TAG_file_type ] +!4 = metadata !{metadata !"empty.c", metadata !"/home/nlewycky"} +!5 = metadata !{i32 1, metadata !"Debug Info Version", i32 1} |