summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/c-index-pch.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-16 18:18:30 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-16 18:18:30 +0000
commitd2eb58abac2d25b188628e825eab75077eb7aac8 (patch)
tree55f7b6d575dc540e4eee6f3e36972885ea89db9d /clang/test/Index/c-index-pch.c
parentd0099a94dbf2e2a14b654d8c333a03b9c8ec8fca (diff)
downloadbcm5719-llvm-d2eb58abac2d25b188628e825eab75077eb7aac8.tar.gz
bcm5719-llvm-d2eb58abac2d25b188628e825eab75077eb7aac8.zip
Add support for a chain of stat caches in the FileManager, rather than
only supporting a single stat cache. The immediate benefit of this change is that we can now generate a PCH/AST file when including another PCH file; in the future, the chain of stat caches will likely be useful with multiple levels of PCH files. llvm-svn: 84263
Diffstat (limited to 'clang/test/Index/c-index-pch.c')
-rw-r--r--clang/test/Index/c-index-pch.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Index/c-index-pch.c b/clang/test/Index/c-index-pch.c
new file mode 100644
index 00000000000..2298c8f207b
--- /dev/null
+++ b/clang/test/Index/c-index-pch.c
@@ -0,0 +1,7 @@
+// RUN: clang-cc -emit-pch -x c -o %t.pch %S/c-index-pch.h &&
+// RUN: clang-cc -include-pch %t.pch -x c -emit-pch -o %t.ast %s &&
+// RUN: c-index-test %t.ast all | FileCheck -check-prefix=ALL %s
+// CHECK-ALL: FunctionDecl=foo
+// CHECK-ALL: VarDecl=bar
+// CHECK-ALL: FunctionDecl=wibble
+void wibble(int i);
OpenPOWER on IntegriCloud