summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/submodule-visibility
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-07-01 02:29:35 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-07-01 02:29:35 +0000
commit2aedca340c84eafdc7285eb68145e55213324185 (patch)
treea5f7498611c5aa78996d2f9cad700e04aa8f93a0 /clang/test/Modules/Inputs/submodule-visibility
parent8fabc1b47d0237f363c1a34dc5de744973c74891 (diff)
downloadbcm5719-llvm-2aedca340c84eafdc7285eb68145e55213324185.tar.gz
bcm5719-llvm-2aedca340c84eafdc7285eb68145e55213324185.zip
[modules] Before checking whether the controlling macro of a header is defined,
update the identifier in case we've imported a definition of the macro (and thus the contents of the header) from a module. Also fold ExternalIdentifierLookup into ExternalPreprocessorSource; it no longer makes sense to keep these separate now that the only user of the former also needs the latter. llvm-svn: 241137
Diffstat (limited to 'clang/test/Modules/Inputs/submodule-visibility')
-rw-r--r--clang/test/Modules/Inputs/submodule-visibility/a.h2
-rw-r--r--clang/test/Modules/Inputs/submodule-visibility/b.h3
-rw-r--r--clang/test/Modules/Inputs/submodule-visibility/c.h6
-rw-r--r--clang/test/Modules/Inputs/submodule-visibility/module.modulemap1
-rw-r--r--clang/test/Modules/Inputs/submodule-visibility/other.h1
5 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/submodule-visibility/a.h b/clang/test/Modules/Inputs/submodule-visibility/a.h
index 34ac6b2b2ea..e4965d72218 100644
--- a/clang/test/Modules/Inputs/submodule-visibility/a.h
+++ b/clang/test/Modules/Inputs/submodule-visibility/a.h
@@ -5,3 +5,5 @@ int n;
#endif
#define A
+
+#include "c.h"
diff --git a/clang/test/Modules/Inputs/submodule-visibility/b.h b/clang/test/Modules/Inputs/submodule-visibility/b.h
index dae75bf3315..67ef6529dbd 100644
--- a/clang/test/Modules/Inputs/submodule-visibility/b.h
+++ b/clang/test/Modules/Inputs/submodule-visibility/b.h
@@ -1,5 +1,8 @@
int m = n;
+#include "other.h"
+#include "c.h"
+
#if defined(A) && !defined(ALLOW_NAME_LEAKAGE)
#error A is defined
#endif
diff --git a/clang/test/Modules/Inputs/submodule-visibility/c.h b/clang/test/Modules/Inputs/submodule-visibility/c.h
new file mode 100644
index 00000000000..259b8c7c61c
--- /dev/null
+++ b/clang/test/Modules/Inputs/submodule-visibility/c.h
@@ -0,0 +1,6 @@
+#ifndef C_H_INCLUDED
+#define C_H_INCLUDED
+
+struct C {};
+
+#endif
diff --git a/clang/test/Modules/Inputs/submodule-visibility/module.modulemap b/clang/test/Modules/Inputs/submodule-visibility/module.modulemap
index 2e13344dc63..d2f0c7783ff 100644
--- a/clang/test/Modules/Inputs/submodule-visibility/module.modulemap
+++ b/clang/test/Modules/Inputs/submodule-visibility/module.modulemap
@@ -1,4 +1,5 @@
module x { module a { header "a.h" } module b { header "b.h" } }
+module other { header "other.h" }
module cycles {
module cycle1 { header "cycle1.h" }
diff --git a/clang/test/Modules/Inputs/submodule-visibility/other.h b/clang/test/Modules/Inputs/submodule-visibility/other.h
new file mode 100644
index 00000000000..f40c757ca62
--- /dev/null
+++ b/clang/test/Modules/Inputs/submodule-visibility/other.h
@@ -0,0 +1 @@
+#include "c.h"
OpenPOWER on IntegriCloud