[llvm] 9c73e55 - Revert "[DebugInfo] Remove dots from getFilenameByIndex return value"
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 10:07:43 PDT 2020
Author: Petr Hosek
Date: 2020-09-15T10:06:47-07:00
New Revision: 9c73e555104336109bb8327b80f3e6a42a17ef1d
URL: https://github.com/llvm/llvm-project/commit/9c73e555104336109bb8327b80f3e6a42a17ef1d
DIFF: https://github.com/llvm/llvm-project/commit/9c73e555104336109bb8327b80f3e6a42a17ef1d.diff
LOG: Revert "[DebugInfo] Remove dots from getFilenameByIndex return value"
This is failing on Windows bots due to path separator normalization.
This reverts commit 042c23506869b4ae9a49d2c4bc5ea6e6baeabe78.
Added:
Modified:
lld/test/COFF/duplicate-dwarf.s
lld/test/COFF/undefined-symbol-dwarf.s
lld/test/ELF/conflict-debug-variable2.s
lld/test/wasm/debuginfo.test
llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
llvm/test/tools/llvm-symbolizer/frame-fortran.s
Removed:
################################################################################
diff --git a/lld/test/COFF/duplicate-dwarf.s b/lld/test/COFF/duplicate-dwarf.s
index d3863e9ca366..b81c13c4300a 100644
--- a/lld/test/COFF/duplicate-dwarf.s
+++ b/lld/test/COFF/duplicate-dwarf.s
@@ -4,21 +4,21 @@
# RUN: not lld-link -lldmingw -out:%t.exe %t.o %t.dupl.o -entry:_Z4funcv 2>&1 | FileCheck %s
# CHECK: error: duplicate symbol: func()
-# CHECK-NEXT: >>> defined at /path{{[/\\]}}to{{[/\\]}}src{{[/\\]}}dupl.cpp:6
+# CHECK-NEXT: >>> defined at /path/to/src{{[/\\]}}dupl.cpp:6
# CHECK-NEXT: >>> {{.*}}.o
-# CHECK-NEXT: >>> defined at /path{{[/\\]}}to{{[/\\]}}src{{[/\\]}}dupl.cpp:6
+# CHECK-NEXT: >>> defined at /path/to/src{{[/\\]}}dupl.cpp:6
# CHECK-NEXT: >>> {{.*}}.o
# CHECK-EMPTY:
# CHECK-NEXT: error: duplicate symbol: _var
-# CHECK-NEXT: >>> defined at /path{{[/\\]}}to{{[/\\]}}src{{[/\\]}}dupl.cpp:1
+# CHECK-NEXT: >>> defined at /path/to/src{{[/\\]}}dupl.cpp:1
# CHECK-NEXT: >>> {{.*}}.o
-# CHECK-NEXT: >>> defined at /path{{[/\\]}}to{{[/\\]}}src{{[/\\]}}dupl.cpp:1
+# CHECK-NEXT: >>> defined at /path/to/src{{[/\\]}}dupl.cpp:1
# CHECK-NEXT: >>> {{.*}}.o
# CHECK-EMPTY:
# CHECK-NEXT: error: duplicate symbol: A::namespaceVar
-# CHECK-NEXT: >>> defined at /path{{[/\\]}}to{{[/\\]}}src{{[/\\]}}dupl.cpp:3
+# CHECK-NEXT: >>> defined at /path/to/src{{[/\\]}}dupl.cpp:3
# CHECK-NEXT: >>> {{.*}}.o
-# CHECK-NEXT: >>> defined at /path{{[/\\]}}to{{[/\\]}}src{{[/\\]}}dupl.cpp:3
+# CHECK-NEXT: >>> defined at /path/to/src{{[/\\]}}dupl.cpp:3
# CHECK-NEXT: >>> {{.*}}.o
.text
diff --git a/lld/test/COFF/undefined-symbol-dwarf.s b/lld/test/COFF/undefined-symbol-dwarf.s
index 4e890987a1f4..7e677f88b7e0 100644
--- a/lld/test/COFF/undefined-symbol-dwarf.s
+++ b/lld/test/COFF/undefined-symbol-dwarf.s
@@ -3,11 +3,11 @@
# RUN: not lld-link /lldmingw /out:%t.exe %t.o /entry:entry 2>&1 | FileCheck %s
# CHECK: error: undefined symbol: bar()
-# CHECK-NEXT: >>> referenced by /path{{[/\\]}}to{{[/\\]}}src{{[/\\]}}undef.cpp:17
+# CHECK-NEXT: >>> referenced by /path/to/src{{[/\\]}}undef.cpp:17
# CHECK-NEXT: >>> {{.*}}.o:(entry)
# CHECK-EMPTY:
# CHECK-NEXT: error: undefined symbol: foo()
-# CHECK-NEXT: >>> referenced by /path{{[/\\]}}to{{[/\\]}}src{{[/\\]}}undef.cpp:7
+# CHECK-NEXT: >>> referenced by /path/to/src{{[/\\]}}undef.cpp:7
# CHECK-NEXT: >>> {{.*}}.o:(A::afunc())
.text
diff --git a/lld/test/ELF/conflict-debug-variable2.s b/lld/test/ELF/conflict-debug-variable2.s
index 2b5ea882012e..3fb59e6b4d02 100644
--- a/lld/test/ELF/conflict-debug-variable2.s
+++ b/lld/test/ELF/conflict-debug-variable2.s
@@ -7,14 +7,14 @@
# INPUT-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000027] = "foo")
# INPUT-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0033 => {0x00000033} "int")
# INPUT-NEXT: DW_AT_external [DW_FORM_flag_present] (true)
-# INPUT-NEXT: DW_AT_decl_file [DW_FORM_data1] ("/home{{(/|\\)}}path{{(/|\\)}}test.c")
+# INPUT-NEXT: DW_AT_decl_file [DW_FORM_data1] ("/home/path/test.c")
# INPUT-NEXT: DW_AT_decl_line [DW_FORM_data1] (1)
# INPUT-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x0)
# INPUT: DW_TAG_variable
# INPUT-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000002f] = "bar")
# INPUT-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0033 => {0x00000033} "int")
# INPUT-NEXT: DW_AT_external [DW_FORM_flag_present] (true)
-# INPUT-NEXT: DW_AT_decl_file [DW_FORM_data1] ("/home{{(/|\\)}}path{{(/|\\)}}test.c")
+# INPUT-NEXT: DW_AT_decl_file [DW_FORM_data1] ("/home/path/test.c")
# INPUT-NEXT: DW_AT_decl_line [DW_FORM_data1] (2)
# INPUT-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x0)
diff --git a/lld/test/wasm/debuginfo.test b/lld/test/wasm/debuginfo.test
index f6aae5a6c2fd..2566b74d93bf 100644
--- a/lld/test/wasm/debuginfo.test
+++ b/lld/test/wasm/debuginfo.test
@@ -16,13 +16,13 @@ CHECK-NEXT: DW_AT_low_pc
CHECK-NEXT: DW_AT_high_pc
CHECK-NEXT: DW_AT_frame_base
CHECK-NEXT: DW_AT_name ("test")
-CHECK-NEXT: DW_AT_decl_file ("/Users{{(/|\\)}}yury{{(/|\\)}}llvmwasm{{(/|\\)}}hi.c")
+CHECK-NEXT: DW_AT_decl_file ("/Users/yury/llvmwasm{{(/|\\)}}hi.c")
CHECK-NEXT: DW_AT_decl_line (3)
CHECK-NEXT: DW_AT_prototyped (true)
CHECK: DW_TAG_formal_parameter
CHECK-NEXT: DW_AT_name ("t")
-CHECK-NEXT: DW_AT_decl_file ("/Users{{(/|\\)}}yury{{(/|\\)}}llvmwasm{{(/|\\)}}hi.c")
+CHECK-NEXT: DW_AT_decl_file ("/Users/yury/llvmwasm{{(/|\\)}}hi.c")
CHECK-NEXT: DW_AT_decl_line (3)
CHECK: DW_TAG_subprogram
@@ -30,7 +30,7 @@ CHECK-NEXT: DW_AT_low_pc
CHECK-NEXT: DW_AT_high_pc
CHECK-NEXT: DW_AT_frame_base
CHECK-NEXT: DW_AT_name ("_start")
-CHECK-NEXT: DW_AT_decl_file ("/Users{{(/|\\)}}yury{{(/|\\)}}llvmwasm{{(/|\\)}}hi.c")
+CHECK-NEXT: DW_AT_decl_file ("/Users/yury/llvmwasm{{(/|\\)}}hi.c")
CHECK-NEXT: DW_AT_decl_line (7)
CHECK: DW_TAG_base_type
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
index e7662fc5d295..678f58694e0b 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
@@ -1391,7 +1391,6 @@ bool DWARFDebugLine::Prologue::getFileNameByIndex(
// sys::path::append skips empty strings.
sys::path::append(FilePath, Style, IncludeDir, FileName);
- sys::path::remove_dots(FilePath, /*remove_dot_dot=*/true, Style);
Result = std::string(FilePath.str());
return true;
}
diff --git a/llvm/test/tools/llvm-symbolizer/frame-fortran.s b/llvm/test/tools/llvm-symbolizer/frame-fortran.s
index 0cd6f2838a6b..744236fd76f9 100644
--- a/llvm/test/tools/llvm-symbolizer/frame-fortran.s
+++ b/llvm/test/tools/llvm-symbolizer/frame-fortran.s
@@ -13,7 +13,7 @@
// CHECK: foo
// CHECK-NEXT: array
-// CHECK-NEXT: /home/ubuntu{{/|\\}}example.cpp:1
+// CHECK-NEXT: /home/ubuntu{{/|\\}}.{{/|\\}}example.cpp:1
// CHECK-NEXT: -24 8 ??
.file "example.cpp"
More information about the llvm-commits
mailing list