summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-01 05:09:09 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-01 05:09:09 +0000
commit386ef885bbc5c21dc8cd2ece0cc0d3852f1ae89d (patch)
tree9b64292500cccb6053e3f19c8b31acbfaf8e44ff /clang/test
parent1b1d3f6b0c305cadc59f759803c4f000e2637ffd (diff)
downloadbcm5719-llvm-386ef885bbc5c21dc8cd2ece0cc0d3852f1ae89d.tar.gz
bcm5719-llvm-386ef885bbc5c21dc8cd2ece0cc0d3852f1ae89d.zip
Pull clang-cc code for generating PTH files based on the input type.
- <rdar://problem/6741594> [pth] don't abuse -x to drive pth generation - Simpler, and fixes PR3915. Cleanup test cases for PTH: - Update to use -emit-pth - Removed PTH test of carbon.c and cocoa.mm; these didn't actually verify anything, and since PTH is token based the extra coverage (over cocoa.m) isn't particularly helpful. - Split PTH tests in cocoa.m to cocoa-pth.m, solely to increase available parallelism when running tests. Ted, could you update the PTH test cases (include-pth.c and cocoa-pth.m) to have some sort of positive check that the PTH is getting used? "# of PTH cache hits" or "tokens read from PTH cache" statistics would work great. :) llvm-svn: 68189
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Driver/preprocessor.c6
-rw-r--r--clang/test/Preprocessor/include-pth.c2
-rw-r--r--clang/test/Sema/carbon.c3
-rw-r--r--clang/test/SemaObjC/cocoa.m6
-rw-r--r--clang/test/SemaObjCXX/cocoa.mm4
5 files changed, 10 insertions, 11 deletions
diff --git a/clang/test/Driver/preprocessor.c b/clang/test/Driver/preprocessor.c
new file mode 100644
index 00000000000..ec1f42f5baf
--- /dev/null
+++ b/clang/test/Driver/preprocessor.c
@@ -0,0 +1,6 @@
+// RUN: clang -E -x c-header %s > %t &&
+// RUN: grep 'B B' %t
+
+#define A B
+A A
+
diff --git a/clang/test/Preprocessor/include-pth.c b/clang/test/Preprocessor/include-pth.c
index 2bdc7dc8746..2afc66a55b0 100644
--- a/clang/test/Preprocessor/include-pth.c
+++ b/clang/test/Preprocessor/include-pth.c
@@ -1,3 +1,3 @@
-// RUN: clang-cc -x c-header %s -o %t &&
+// RUN: clang-cc -emit-pth %s -o %t &&
// RUN: clang-cc -include-pth %t %s -E | grep 'file_to_include' | count 2
#include "file_to_include.h"
diff --git a/clang/test/Sema/carbon.c b/clang/test/Sema/carbon.c
index edb4d9729b1..983a000b2cf 100644
--- a/clang/test/Sema/carbon.c
+++ b/clang/test/Sema/carbon.c
@@ -1,5 +1,4 @@
-// RUN: clang-cc %s -fsyntax-only -print-stats &&
-// RUN: clang-cc -x c-header -o %t %s && clang-cc -token-cache %t %s
+// RUN: clang-cc %s -fsyntax-only -print-stats
#ifdef __APPLE__
#include <Carbon/Carbon.h>
#endif
diff --git a/clang/test/SemaObjC/cocoa.m b/clang/test/SemaObjC/cocoa.m
index cba4481a5b6..153c46e1034 100644
--- a/clang/test/SemaObjC/cocoa.m
+++ b/clang/test/SemaObjC/cocoa.m
@@ -1,9 +1,5 @@
// RUN: clang-cc %s -print-stats &&
-// RUN: clang-cc %s -disable-free &&
-// RUN: clang-cc -x objective-c-header -o %t %s &&
-// RUN: clang-cc -token-cache %t %s &&
-// RUN: clang-cc -x objective-c-header -o %t %s &&
-// RUN: clang-cc -token-cache %t %s -E %s -o /dev/null
+// RUN: clang-cc %s -disable-free
#ifdef __APPLE__
#include <Cocoa/Cocoa.h>
#endif
diff --git a/clang/test/SemaObjCXX/cocoa.mm b/clang/test/SemaObjCXX/cocoa.mm
index 00b6d747c3d..dd9684ce065 100644
--- a/clang/test/SemaObjCXX/cocoa.mm
+++ b/clang/test/SemaObjCXX/cocoa.mm
@@ -1,6 +1,4 @@
-// RUN: clang-cc %s -print-stats &&
-// RUN: clang-cc -x objective-c++-header -o %t %s &&
-// RUN: clang-cc -token-cache %t %s
+// RUN: clang-cc %s -print-stats
#ifdef __APPLE__
#include <Cocoa/Cocoa.h>
#endif
OpenPOWER on IntegriCloud