summaryrefslogtreecommitdiff
path: root/test/Modules/diamond.c
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-08-18 19:06:24 +0000
committerChad Rosier <mcrosier@apple.com>2011-08-18 19:06:24 +0000
commit870d1fee3c5027efe7fd23d6935952bc1f419f99 (patch)
tree43a5d2be5924494607d0ac3c678a7e89250493d6 /test/Modules/diamond.c
parent647a75160df6d53d26724038b3bfe0d836513f58 (diff)
downloadclang-870d1fee3c5027efe7fd23d6935952bc1f419f99.tar.gz
Temporarily revert r137925 to appease buildbots. Original commit message:
Teach ModuleManager::addModule() to check whether a particular module has already been loaded before allocating a new Module structure. If the module has already been loaded (uniquing based on file name), then just return the existing module rather than trying to load it again. This allows us to load a DAG of modules. Introduce a simple test case that forms a diamond-shaped module graph, and illustrates that a source file importing the bottom of the diamond can see declarations in all four of the modules that make up the diamond. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137971 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules/diamond.c')
-rw-r--r--test/Modules/diamond.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/test/Modules/diamond.c b/test/Modules/diamond.c
deleted file mode 100644
index fdec7b3aab..0000000000
--- a/test/Modules/diamond.c
+++ /dev/null
@@ -1,14 +0,0 @@
-// in diamond-bottom.h: expected-note{{passing argument to parameter 'x' here}}
-void test_diamond(int i, float f, double d, char c) {
- top(&i);
- left(&f);
- right(&d);
- bottom(&c);
- bottom(&d); // expected-warning{{incompatible pointer types passing 'double *' to parameter of type 'char *'}}
-}
-
-// RUN: %clang_cc1 -emit-pch -o %t_top.h.pch %S/Inputs/diamond_top.h
-// RUN: %clang_cc1 -import-module %t_top.h.pch -emit-pch -o %t_left.h.pch %S/Inputs/diamond_left.h
-// RUN: %clang_cc1 -import-module %t_top.h.pch -emit-pch -o %t_right.h.pch %S/Inputs/diamond_right.h
-// RUN: %clang_cc1 -import-module %t_left.h.pch -import-module %t_right.h.pch -emit-pch -o %t_bottom.h.pch %S/Inputs/diamond_bottom.h
-// RUN: %clang_cc1 -import-module %t_bottom.h.pch -verify %s