[clang] 68e49ae - Revert "[clang] Fix absolute file paths with -fdebug-prefix-map"
Keith Smiley via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 8 10:40:00 PDT 2021
Author: Keith Smiley
Date: 2021-10-08T10:39:44-07:00
New Revision: 68e49aea9ac4dca550df70706cc845de04939c03
URL: https://github.com/llvm/llvm-project/commit/68e49aea9ac4dca550df70706cc845de04939c03
DIFF: https://github.com/llvm/llvm-project/commit/68e49aea9ac4dca550df70706cc845de04939c03.diff
LOG: Revert "[clang] Fix absolute file paths with -fdebug-prefix-map"
This reverts commit a23a5967932292b82e9a7e4b37817d1b3f5be5ec.
This broke a windows test https://buildkite.com/llvm-project/premerge-checks/builds/59492#7dad207c-6cbe-40ad-95e4-c48b47fe2527
Differential Revision: https://reviews.llvm.org/D111444
Added:
Modified:
clang/lib/CodeGen/CGDebugInfo.cpp
Removed:
clang/test/CodeGen/relative-debug-prefix-map.c
################################################################################
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 42127d652e766..9c98278aa6221 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -446,9 +446,6 @@ CGDebugInfo::createFile(StringRef FileName,
Dir = DirBuf;
File = FileBuf;
}
- } else if (llvm::sys::path::is_absolute(FileName)) {
- Dir = llvm::sys::path::parent_path(RemappedFile);
- File = llvm::sys::path::filename(RemappedFile);
} else {
Dir = CurDir;
File = RemappedFile;
diff --git a/clang/test/CodeGen/relative-debug-prefix-map.c b/clang/test/CodeGen/relative-debug-prefix-map.c
deleted file mode 100644
index 54fee97a83d0d..0000000000000
--- a/clang/test/CodeGen/relative-debug-prefix-map.c
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: mkdir -p %t.nested/dir && cd %t.nested/dir
-// RUN: cp %s %t.nested/dir/main.c
-// RUN: %clang_cc1 -debug-info-kind=standalone -fdebug-prefix-map=%t.nested=. %t.nested/dir/main.c -emit-llvm -o - | FileCheck %s
-//
-// RUN: %clang_cc1 -debug-info-kind=standalone -fdebug-prefix-map=%p=. %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-DIRECT
-//
-// RUN: cd %p
-// RUN: %clang_cc1 -debug-info-kind=standalone -fdebug-compilation-dir=. relative-debug-prefix-map.c -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-DIRECT
-
-// CHECK: !DIFile(filename: "main.c", directory: "./dir")
-// CHECK-DIRECT: !DIFile(filename: "relative-debug-prefix-map.c", directory: ".")
-
-int main(int argc, char **argv) {
- (void)argc;
- (void)argv;
- return 0;
-}
More information about the cfe-commits
mailing list