aboutsummaryrefslogtreecommitdiff
path: root/test/Driver/debug.c
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-10-21 02:32:14 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-10-21 02:32:14 +0000
commit7c4fd9121f5885096fd3258d20a984e3f08f8603 (patch)
tree893801c3743e40c6bc4da17e1f4b30bce28c0cc7 /test/Driver/debug.c
parent0e9e9814a7f8313c0c02b6afea71f0e4c411873e (diff)
Take DW_AT_comp_dir from $PWD when it's present and starts with a '/'. This is
closer to what GCC does, except that GCC also checks that the inodes for $PWD and '.' match. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142633 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/debug.c')
-rw-r--r--test/Driver/debug.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Driver/debug.c b/test/Driver/debug.c
new file mode 100644
index 0000000000..2ed8921769
--- /dev/null
+++ b/test/Driver/debug.c
@@ -0,0 +1,8 @@
+// RUN: %clang -### -g %s -c 2>&1 | grep '"-fdebug-compilation-dir" "'%S'"'
+// RUN: PWD=/foo %clang -### -g %s -c 2>&1 | grep '"-fdebug-compilation-dir" "/foo"'
+
+// This test uses grep instead of FileCheck so that we get %S -> dirname
+// substitution.
+
+// "PWD=/foo gcc" wouldn't necessarily work. You would need to pick a different
+// path to the same directory (try a symlink).