summaryrefslogtreecommitdiff
path: root/test/DebugInfo
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-03-20 17:05:45 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-03-20 17:05:45 +0000
commitb5a1fccdc51461f022617343c7455623794cfb90 (patch)
tree5311aee16e6d2c357e90ad3684faef973213b267 /test/DebugInfo
parent31bd14fc2d0c99f661609ff069bc127a8f8cd050 (diff)
downloadllvm-b5a1fccdc51461f022617343c7455623794cfb90.tar.gz
llvm-b5a1fccdc51461f022617343c7455623794cfb90.tar.bz2
llvm-b5a1fccdc51461f022617343c7455623794cfb90.tar.xz
Add comments from Eric's review of r204094.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204358 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo')
-rw-r--r--test/DebugInfo/lto-comp-dir.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/DebugInfo/lto-comp-dir.ll b/test/DebugInfo/lto-comp-dir.ll
index eeaf4c0a65..d272dff6ea 100644
--- a/test/DebugInfo/lto-comp-dir.ll
+++ b/test/DebugInfo/lto-comp-dir.ll
@@ -3,6 +3,10 @@
; RUN: %llc_dwarf < %s -filetype=obj | llvm-dwarfdump -debug-dump=line - | FileCheck %s
; RUN: %llc_dwarf < %s -filetype=asm | FileCheck --check-prefix=ASM %s
+; If multiple line tables are emitted, one per CU, those line tables can
+; unambiguously rely on the comp_dir of their owning CU and use directory '0'
+; to refer to it.
+
; CHECK: .debug_line contents:
; CHECK-NEXT: Line table prologue:
; CHECK-NOT: include_directories
@@ -14,6 +18,11 @@
; CHECK: file_names[ 1] 0 {{.*}} b.cpp
; CHECK-NOT: file_names
+; However, if a single line table is emitted and shared between CUs, the
+; comp_dir is ambiguous and relying on it would lead to different path
+; interpretations depending on which CU lead to the table - so ensure that
+; full paths are always emitted in this case, never comp_dir relative.
+
; ASM: .file 1 "/tmp/dbginfo/a{{[/\\]+}}a.cpp"
; ASM: .file 2 "/tmp/dbginfo/b{{[/\\]+}}b.cpp"