When we reach the end of a #include of a header of a local submodule that we
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 1 Sep 2016 20:15:25 +0000 (20:15 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 1 Sep 2016 20:15:25 +0000 (20:15 +0000)
commit30fc9a9339de86b098667a8fa9eba6da1f7232d2
tree25f064f28b750b3429481711358cf4ebbc895ac4
parent2fa35194632ce6ebfa2d6782afd62e1274d2e225
When we reach the end of a #include of a header of a local submodule that we
textually included, create an ImportDecl just as we would if we reached a
#include of any other modular header. This is necessary in order to correctly
determine the set of variables to initialize for an imported module.

This should hopefully make the modules selfhost buildbot green again.

llvm-svn: 280409
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaDecl.cpp
clang/test/Modules/global-init.cpp [new file with mode: 0644]
clang/tools/libclang/CXIndexDataConsumer.cpp