aboutsummaryrefslogtreecommitdiff
path: root/test/Driver/debug-comp-dir.S
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-12-17 21:40:04 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-12-17 21:40:04 +0000
commitd566df67bed6381f6e859bbd21fd43ff89277cc0 (patch)
treeef5937d68dd571048353a1766e9174e6d491e3db /test/Driver/debug-comp-dir.S
parent2bff7e5a02495dabd26013c15613f082fce67633 (diff)
Fix PR14625 by teaching the driver to detect PWD for assembly files.
This also requires adding support to -cc1as for passing the detecting PWD down through LLVM's debug info (which in turn required the LLVM change in r170371). The test case is weak (we only test the driver behavior) because there is currently to infrastructure for running cc1as in the test suite. So those four lines are untested (much like all other lines in that file), but we have a test for the same pattern using llvm-mc in the LLVM repository. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/debug-comp-dir.S')
-rw-r--r--test/Driver/debug-comp-dir.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Driver/debug-comp-dir.S b/test/Driver/debug-comp-dir.S
new file mode 100644
index 0000000000..ca1ca30ae6
--- /dev/null
+++ b/test/Driver/debug-comp-dir.S
@@ -0,0 +1,11 @@
+// RUN: cd %S && %clang -### -g %s -c 2>&1 | FileCheck -check-prefix=CHECK-PWD %s
+// CHECK-PWD: {{"-fdebug-compilation-dir" ".*Driver.*"}}
+
+// RUN: env PWD=/foo %clang -### -g %s -c 2>&1 | FileCheck -check-prefix=CHECK-FOO %s
+// CHECK-FOO: {{"-fdebug-compilation-dir" ".*foo"}}
+
+// "PWD=/foo gcc" wouldn't necessarily work. You would need to pick a different
+// path to the same directory (try a symlink).
+
+// This depends on host's behavior how $PWD would be set.
+// REQUIRES: shell