[modules] When we #include a local submodule header that we've already built,
and it has an include guard, produce callbacks for a module import, not for a
skipped non-modular header.

Fixes -E output when preprocessing a module to list these cases as a module
import, rather than suppressing the #include and losing the import side effect.

llvm-svn: 304183
diff --git a/clang/test/Modules/Inputs/preprocess/a.h b/clang/test/Modules/Inputs/preprocess/a.h
new file mode 100644
index 0000000..1292e99
--- /dev/null
+++ b/clang/test/Modules/Inputs/preprocess/a.h
@@ -0,0 +1,2 @@
+#include "c.h"
+T a();
diff --git a/clang/test/Modules/Inputs/preprocess/b.h b/clang/test/Modules/Inputs/preprocess/b.h
new file mode 100644
index 0000000..e8a9f55
--- /dev/null
+++ b/clang/test/Modules/Inputs/preprocess/b.h
@@ -0,0 +1,2 @@
+#include "c.h"
+T b();
diff --git a/clang/test/Modules/Inputs/preprocess/c.h b/clang/test/Modules/Inputs/preprocess/c.h
new file mode 100644
index 0000000..718f5dc
--- /dev/null
+++ b/clang/test/Modules/Inputs/preprocess/c.h
@@ -0,0 +1,4 @@
+#ifndef C_H
+#define C_H
+using T = int;
+#endif
diff --git a/clang/test/Modules/Inputs/preprocess/module.modulemap b/clang/test/Modules/Inputs/preprocess/module.modulemap
index 943435a..f700db0 100644
--- a/clang/test/Modules/Inputs/preprocess/module.modulemap
+++ b/clang/test/Modules/Inputs/preprocess/module.modulemap
@@ -1,2 +1,7 @@
 module fwd { header "fwd.h" export * }
 module file { header "file.h" header "file2.h" export * }
+module nested {
+  module a { header "a.h" }
+  module b { header "b.h" }
+  module c { header "c.h" }
+}