Reinstate r213348, reverted in r213395, with an additional bug fix and more
thorough tests.
Original commit message:
[modules] Fix macro hiding bug exposed if:
* A submodule of module A is imported into module B
* Another submodule of module A that is not imported into B exports a macro
* Some submodule of module B also exports a definition of the macro, and
happens to be the first submodule of B that imports module A.
In this case, we would incorrectly determine that A's macro redefines B's
macro, and so we don't need to re-export B's macro at all.
This happens with the 'assert' macro in an LLVM self-host. =(
llvm-svn: 213416
diff --git a/clang/test/Modules/Inputs/macro-hiding/c1.h b/clang/test/Modules/Inputs/macro-hiding/c1.h
new file mode 100644
index 0000000..4b78b3c
--- /dev/null
+++ b/clang/test/Modules/Inputs/macro-hiding/c1.h
@@ -0,0 +1,2 @@
+#include "b1.h"
+#define assert(x)