[clang] bc7aeea - Revert "Don't append the working directory to absolute paths"
Adrian Prantl via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 25 17:00:29 PST 2022
Author: Adrian Prantl
Date: 2022-02-25T17:00:10-08:00
New Revision: bc7aeea8542d48111f8cc923451b7c53347c75b5
URL: https://github.com/llvm/llvm-project/commit/bc7aeea8542d48111f8cc923451b7c53347c75b5
DIFF: https://github.com/llvm/llvm-project/commit/bc7aeea8542d48111f8cc923451b7c53347c75b5.diff
LOG: Revert "Don't append the working directory to absolute paths"
This reverts commit 2cd9a86da54f8be4eb2aff3e766b125cbdeb023f.
Added:
Modified:
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/CodeGen/debug-prefix-map.c
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 28d318cdd4080..2203f0aec5c7c 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -444,8 +444,7 @@ CGDebugInfo::createFile(StringRef FileName,
File = FileBuf;
}
} else {
- if (!llvm::sys::path::is_absolute(FileName))
- Dir = CurDir;
+ Dir = CurDir;
File = RemappedFile;
}
llvm::DIFile *F = DBuilder.createFile(File, Dir, CSInfo, Source);
diff --git a/clang/test/CodeGen/debug-prefix-map.c b/clang/test/CodeGen/debug-prefix-map.c
index 2241b703f9001..1c5d3a6e78bb2 100644
--- a/clang/test/CodeGen/debug-prefix-map.c
+++ b/clang/test/CodeGen/debug-prefix-map.c
@@ -5,8 +5,6 @@
// RUN: %clang_cc1 -debug-info-kind=standalone -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty %s -emit-llvm -o - -isysroot %p -debugger-tuning=lldb | FileCheck %s -check-prefix CHECK-SYSROOT
// RUN: %clang -g -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty -S -c %s -emit-llvm -o - | FileCheck %s
// RUN: %clang -g -ffile-prefix-map=%p=/UNLIKELY_PATH/empty -S -c %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang -g -fdebug-prefix-map=%p=./UNLIKELY_PATH/empty -S -c %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-REL
-// RUN: %clang -g -ffile-prefix-map=%p=./UNLIKELY_PATH/empty -S -c %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-REL
#include "Inputs/stdio.h"
@@ -44,7 +42,3 @@ void test_rewrite_includes(void) {
// CHECK-COMPILATION-DIR: !DIFile(filename: "{{.*}}Inputs/stdio.h", directory: "/UNLIKELY_PATH/empty")
// CHECK-COMPILATION-DIR-NOT: !DIFile(filename:
// CHECK-SYSROOT: !DICompileUnit({{.*}}sysroot: "/UNLIKELY_PATH/empty"
-
-// CHECK-REL: !DIFile(filename: "./UNLIKELY_PATH/empty{{/|\\\\}}{{.*}}",
-// CHECK-REL: !DIFile(filename: "./UNLIKELY_PATH/empty{{/|\\\\}}{{.*}}Inputs/stdio.h",
-// CHECK-REL-SAME: directory: "")
More information about the cfe-commits
mailing list