diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-10-21 02:32:14 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-10-21 02:32:14 +0000 |
commit | ba743b75cb555861ba16ae88f728f880bb7fa018 (patch) | |
tree | 4252716c20d652993e66a0c7fc5a0c7724f326ad /clang/test/Driver/debug.c | |
parent | 8f077161391865d46b05a9a50dffa0eedc3d6deb (diff) | |
download | bcm5719-llvm-ba743b75cb555861ba16ae88f728f880bb7fa018.tar.gz bcm5719-llvm-ba743b75cb555861ba16ae88f728f880bb7fa018.zip |
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.
llvm-svn: 142633
Diffstat (limited to 'clang/test/Driver/debug.c')
-rw-r--r-- | clang/test/Driver/debug.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Driver/debug.c b/clang/test/Driver/debug.c new file mode 100644 index 00000000000..2ed8921769f --- /dev/null +++ b/clang/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). |