summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Modules/Inputs')
-rw-r--r--clang/test/Modules/Inputs/macro-ambiguity/a/quote/a_quote.h8
-rw-r--r--clang/test/Modules/Inputs/macro-ambiguity/a/system/a_system.h15
-rw-r--r--clang/test/Modules/Inputs/macro-ambiguity/b/quote/b_quote.h8
-rw-r--r--clang/test/Modules/Inputs/macro-ambiguity/b/system/b_system.h15
-rw-r--r--clang/test/Modules/Inputs/macro-ambiguity/c/quote/c_quote.h7
-rw-r--r--clang/test/Modules/Inputs/macro-ambiguity/c/system/c_system.h14
-rw-r--r--clang/test/Modules/Inputs/macro-ambiguity/d/quote/d_quote.h7
-rw-r--r--clang/test/Modules/Inputs/macro-ambiguity/d/system/d_system.h14
-rw-r--r--clang/test/Modules/Inputs/macro-ambiguity/e/quote/e_quote.h7
-rw-r--r--clang/test/Modules/Inputs/macro-ambiguity/e/system/e_system.h7
-rw-r--r--clang/test/Modules/Inputs/macro-ambiguity/module.modulemap25
11 files changed, 127 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/macro-ambiguity/a/quote/a_quote.h b/clang/test/Modules/Inputs/macro-ambiguity/a/quote/a_quote.h
new file mode 100644
index 00000000000..efe6fa19523
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-ambiguity/a/quote/a_quote.h
@@ -0,0 +1,8 @@
+#ifndef A_QUOTE_H
+#define A_QUOTE_H
+
+#define FOO1_QUOTE(x) x + x
+#define BAR1_QUOTE(x) x + x
+#define BAZ1_QUOTE(x) x + x
+
+#endif
diff --git a/clang/test/Modules/Inputs/macro-ambiguity/a/system/a_system.h b/clang/test/Modules/Inputs/macro-ambiguity/a/system/a_system.h
new file mode 100644
index 00000000000..f9f32879ae9
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-ambiguity/a/system/a_system.h
@@ -0,0 +1,15 @@
+#ifndef A_SYSTEM_H
+#define A_SYSTEM_H
+
+// FIXME: We have to use this to mark the header as a system header in
+// a module because header search didn't actually occur and so we can't have
+// found the header via system header search, even though when we map to this
+// header and load the module we will have mapped to the header by finding it
+// via system header search.
+#pragma GCC system_header
+
+#define FOO1_SYSTEM(x) x + x
+#define BAR1_SYSTEM(x) x + x
+#define BAZ1_SYSTEM(x) x + x
+
+#endif
diff --git a/clang/test/Modules/Inputs/macro-ambiguity/b/quote/b_quote.h b/clang/test/Modules/Inputs/macro-ambiguity/b/quote/b_quote.h
new file mode 100644
index 00000000000..f5e990f1464
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-ambiguity/b/quote/b_quote.h
@@ -0,0 +1,8 @@
+#ifndef B_QUOTE_H
+#define B_QUOTE_H
+
+#define FOO2_QUOTE(x) x + x
+#define BAR2_QUOTE(x) x + x
+#define BAZ2_QUOTE(x) x + x
+
+#endif
diff --git a/clang/test/Modules/Inputs/macro-ambiguity/b/system/b_system.h b/clang/test/Modules/Inputs/macro-ambiguity/b/system/b_system.h
new file mode 100644
index 00000000000..5b55303265e
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-ambiguity/b/system/b_system.h
@@ -0,0 +1,15 @@
+#ifndef B_SYSTEM_H
+#define B_SYSTEM_H
+
+// FIXME: We have to use this to mark the header as a system header in
+// a module because header search didn't actually occur and so we can't have
+// found the header via system header search, even though when we map to this
+// header and load the module we will have mapped to the header by finding it
+// via system header search.
+#pragma GCC system_header
+
+#define FOO2_SYSTEM(x) x + x
+#define BAR2_SYSTEM(x) x + x
+#define BAZ2_SYSTEM(x) x + x
+
+#endif
diff --git a/clang/test/Modules/Inputs/macro-ambiguity/c/quote/c_quote.h b/clang/test/Modules/Inputs/macro-ambiguity/c/quote/c_quote.h
new file mode 100644
index 00000000000..131430026f8
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-ambiguity/c/quote/c_quote.h
@@ -0,0 +1,7 @@
+#ifndef C_QUOTE_H
+#define C_QUOTE_H
+
+#define FOO1_QUOTE(x) 2 * x
+#define FOO2_QUOTE(x) 2 * x
+
+#endif
diff --git a/clang/test/Modules/Inputs/macro-ambiguity/c/system/c_system.h b/clang/test/Modules/Inputs/macro-ambiguity/c/system/c_system.h
new file mode 100644
index 00000000000..25e795d71da
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-ambiguity/c/system/c_system.h
@@ -0,0 +1,14 @@
+#ifndef C_SYSTEM_H
+#define C_SYSTEM_H
+
+// FIXME: We have to use this to mark the header as a system header in
+// a module because header search didn't actually occur and so we can't have
+// found the header via system header search, even though when we map to this
+// header and load the module we will have mapped to the header by finding it
+// via system header search.
+#pragma GCC system_header
+
+#define FOO1_SYSTEM(x) 2 * x
+#define FOO2_SYSTEM(x) 2 * x
+
+#endif
diff --git a/clang/test/Modules/Inputs/macro-ambiguity/d/quote/d_quote.h b/clang/test/Modules/Inputs/macro-ambiguity/d/quote/d_quote.h
new file mode 100644
index 00000000000..ac9d43b9efe
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-ambiguity/d/quote/d_quote.h
@@ -0,0 +1,7 @@
+#ifndef D_QUOTE_H
+#define D_QUOTE_H
+
+#define BAR1_QUOTE(x) 2 * x
+#define BAR2_QUOTE(x) 2 * x
+
+#endif
diff --git a/clang/test/Modules/Inputs/macro-ambiguity/d/system/d_system.h b/clang/test/Modules/Inputs/macro-ambiguity/d/system/d_system.h
new file mode 100644
index 00000000000..5c10cc14e88
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-ambiguity/d/system/d_system.h
@@ -0,0 +1,14 @@
+#ifndef D_SYSTEM_H
+#define D_SYSTEM_H
+
+// FIXME: We have to use this to mark the header as a system header in
+// a module because header search didn't actually occur and so we can't have
+// found the header via system header search, even though when we map to this
+// header and load the module we will have mapped to the header by finding it
+// via system header search.
+#pragma GCC system_header
+
+#define BAR1_SYSTEM(x) 2 * x
+#define BAR2_SYSTEM(x) 2 * x
+
+#endif
diff --git a/clang/test/Modules/Inputs/macro-ambiguity/e/quote/e_quote.h b/clang/test/Modules/Inputs/macro-ambiguity/e/quote/e_quote.h
new file mode 100644
index 00000000000..78494299a94
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-ambiguity/e/quote/e_quote.h
@@ -0,0 +1,7 @@
+#ifndef E_QUOTE_H
+#define E_QUOTE_H
+
+#define BAZ1_QUOTE(x) 2 * x
+#define BAZ2_QUOTE(x) 2 * x
+
+#endif
diff --git a/clang/test/Modules/Inputs/macro-ambiguity/e/system/e_system.h b/clang/test/Modules/Inputs/macro-ambiguity/e/system/e_system.h
new file mode 100644
index 00000000000..c9e13419edc
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-ambiguity/e/system/e_system.h
@@ -0,0 +1,7 @@
+#ifndef E_SYSTEM_H
+#define E_SYSTEM_H
+
+#define BAZ1_SYSTEM(x) 2 * x
+#define BAZ2_SYSTEM(x) 2 * x
+
+#endif
diff --git a/clang/test/Modules/Inputs/macro-ambiguity/module.modulemap b/clang/test/Modules/Inputs/macro-ambiguity/module.modulemap
new file mode 100644
index 00000000000..23da294c745
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-ambiguity/module.modulemap
@@ -0,0 +1,25 @@
+module a {
+ header "Inputs/macro-ambiguity/a/quote/a_quote.h"
+ header "Inputs/macro-ambiguity/a/system/a_system.h"
+ export *
+}
+module b [system] {
+ header "Inputs/macro-ambiguity/b/quote/b_quote.h"
+ header "Inputs/macro-ambiguity/b/system/b_system.h"
+ export *
+}
+module c {
+ header "Inputs/macro-ambiguity/c/quote/c_quote.h"
+ header "Inputs/macro-ambiguity/c/system/c_system.h"
+ export *
+}
+module d [system] {
+ header "Inputs/macro-ambiguity/d/quote/d_quote.h"
+ header "Inputs/macro-ambiguity/d/system/d_system.h"
+ export *
+}
+module e {
+ textual header "Inputs/macro-ambiguity/e/quote/e_quote.h"
+ textual header "Inputs/macro-ambiguity/e/system/e_system.h"
+ export *
+}
OpenPOWER on IntegriCloud