keith created this revision. keith requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
This reverts commit a23a5967932292b82e9a7e4b37817d1b3f5be5ec <https://reviews.llvm.org/rGa23a5967932292b82e9a7e4b37817d1b3f5be5ec>. This broke a windows test https://buildkite.com/llvm-project/premerge-checks/builds/59492#7dad207c-6cbe-40ad-95e4-c48b47fe2527 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D111444 Files: clang/lib/CodeGen/CGDebugInfo.cpp clang/test/CodeGen/relative-debug-prefix-map.c Index: clang/test/CodeGen/relative-debug-prefix-map.c =================================================================== --- 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; -} Index: clang/lib/CodeGen/CGDebugInfo.cpp =================================================================== --- clang/lib/CodeGen/CGDebugInfo.cpp +++ clang/lib/CodeGen/CGDebugInfo.cpp @@ -446,9 +446,6 @@ 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;
Index: clang/test/CodeGen/relative-debug-prefix-map.c =================================================================== --- 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; -} Index: clang/lib/CodeGen/CGDebugInfo.cpp =================================================================== --- clang/lib/CodeGen/CGDebugInfo.cpp +++ clang/lib/CodeGen/CGDebugInfo.cpp @@ -446,9 +446,6 @@ 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;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits