diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-08-20 04:39:52 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-08-20 04:39:52 +0000 |
commit | ab443b9da5bffe755af0fd3f2447ad8cdbf0800f (patch) | |
tree | 7173882bbc14122d890e95d223eaf44324c93478 /clang/test/Modules/diamond.c | |
parent | 5800a8c3ad918ae00344fbab289d94badf586ccd (diff) | |
download | bcm5719-llvm-ab443b9da5bffe755af0fd3f2447ad8cdbf0800f.tar.gz bcm5719-llvm-ab443b9da5bffe755af0fd3f2447ad8cdbf0800f.zip |
Introduce a module visitation function that starts at the top-level
modules (those that no other module depends on) and performs a search
over all of the modules, visiting a new module only when all of the
modules that depend on it have already been visited. The visitor can
abort the search for all modules that a module depends on, which
allows us to minimize the number of lookups necessary when performing
a search.
Switch identifier lookup from a linear walk over the set of modules to
this module visitation operation. The behavior is the same for simple
PCH and chained PCH, but provides the proper search order for
modules. Verified with printf debugging, since we don't have enough in
place to actually test this.
llvm-svn: 138187
Diffstat (limited to 'clang/test/Modules/diamond.c')
-rw-r--r-- | clang/test/Modules/diamond.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Modules/diamond.c b/clang/test/Modules/diamond.c index fdec7b3aab3..220a2790380 100644 --- a/clang/test/Modules/diamond.c +++ b/clang/test/Modules/diamond.c @@ -5,6 +5,9 @@ void test_diamond(int i, float f, double d, char c) { right(&d); bottom(&c); bottom(&d); // expected-warning{{incompatible pointer types passing 'double *' to parameter of type 'char *'}} + + // Names in multiple places in the diamond. + top_left(&c); } // RUN: %clang_cc1 -emit-pch -o %t_top.h.pch %S/Inputs/diamond_top.h |