Skip to content

Commit bc7aeea

Browse files
committed
Revert "Don't append the working directory to absolute paths"
This reverts commit 2cd9a86.
1 parent 8e4f8d3 commit bc7aeea

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

clang/lib/CodeGen/CGDebugInfo.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,7 @@ CGDebugInfo::createFile(StringRef FileName,
444444
File = FileBuf;
445445
}
446446
} else {
447-
if (!llvm::sys::path::is_absolute(FileName))
448-
Dir = CurDir;
447+
Dir = CurDir;
449448
File = RemappedFile;
450449
}
451450
llvm::DIFile *F = DBuilder.createFile(File, Dir, CSInfo, Source);

clang/test/CodeGen/debug-prefix-map.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
// 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
66
// RUN: %clang -g -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty -S -c %s -emit-llvm -o - | FileCheck %s
77
// RUN: %clang -g -ffile-prefix-map=%p=/UNLIKELY_PATH/empty -S -c %s -emit-llvm -o - | FileCheck %s
8-
// RUN: %clang -g -fdebug-prefix-map=%p=./UNLIKELY_PATH/empty -S -c %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-REL
9-
// RUN: %clang -g -ffile-prefix-map=%p=./UNLIKELY_PATH/empty -S -c %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-REL
108

119
#include "Inputs/stdio.h"
1210

@@ -44,7 +42,3 @@ void test_rewrite_includes(void) {
4442
// CHECK-COMPILATION-DIR: !DIFile(filename: "{{.*}}Inputs/stdio.h", directory: "/UNLIKELY_PATH/empty")
4543
// CHECK-COMPILATION-DIR-NOT: !DIFile(filename:
4644
// CHECK-SYSROOT: !DICompileUnit({{.*}}sysroot: "/UNLIKELY_PATH/empty"
47-
48-
// CHECK-REL: !DIFile(filename: "./UNLIKELY_PATH/empty{{/|\\\\}}{{.*}}",
49-
// CHECK-REL: !DIFile(filename: "./UNLIKELY_PATH/empty{{/|\\\\}}{{.*}}Inputs/stdio.h",
50-
// CHECK-REL-SAME: directory: "")

0 commit comments

Comments
 (0)