summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-15 18:49:01 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-15 18:49:01 +0000
commitffbba26285ec2994340f32973aae9a5042a3edd2 (patch)
tree1250dc85ff3cb01fbcd818242c75e468db9fda32 /clang/test
parent00ce8deae695fb98cedc47753a54c3a407cda5ed (diff)
downloadbcm5719-llvm-ffbba26285ec2994340f32973aae9a5042a3edd2.tar.gz
bcm5719-llvm-ffbba26285ec2994340f32973aae9a5042a3edd2.zip
Add '-include-pch' option to the driver, so it can get passed to the cc1 driver.
llvm-svn: 116605
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Driver/pth.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/Driver/pth.c b/clang/test/Driver/pth.c
index 9c47c559937..d6ed90423b6 100644
--- a/clang/test/Driver/pth.c
+++ b/clang/test/Driver/pth.c
@@ -10,3 +10,24 @@
// RUN: FileCheck -check-prefix CHECK2 -input-file %t.log %s
// CHECK2: "{{.*}}/clang{{.*}}" "-cc1" {{.*}}"-include-pth" "{{.*}}.h.pth" {{.*}}"-x" "c" "{{.*}}pth.c"
+
+// RUN: mkdir -p %t.pth
+// RUN: %clang -ccc-pch-is-pth -x c-header %s -o %t.pth/c -### 2> %t.log
+// RUN: FileCheck -check-prefix CHECK3 -input-file %t.log %s
+
+// CHECK3: "{{.*}}/clang{{.*}}" "-cc1" {{.*}} "-o" "{{.*}}.pth/c" "-x" "c-header" "{{.*}}pth.c"
+
+// RUN: rm -f %t.pth/c
+// RUN: %clang -ccc-pch-is-pth -E -include %t %s -### 2> %t.log
+// RUN: echo "DONE" >> %t.log
+// RUN: FileCheck -check-prefix CHECK4 -input-file %t.log %s
+
+// CHECK4: {{.*}} ignoring argument '-include {{.*}}' due to missing precompiled header '{{.*}}.pth/c' for language 'c'
+// CHECK4-NOT: -include-pth
+// CHECK4: DONE
+
+// RUN: touch %t.pth/c
+// RUN: %clang -ccc-pch-is-pth -E -include %t %s -### 2> %t.log
+// RUN: FileCheck -check-prefix CHECK5 -input-file %t.log %s
+
+// CHECK5: "{{.*}}/clang{{.*}}" "-cc1" {{.*}}"-include-pth" "{{.*}}.pth/c" {{.*}}"-x" "c" "{{.*}}pth.c"
OpenPOWER on IntegriCloud