[modules] Determine the set of macros exported by a submodule at the end of that...
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 23 Apr 2015 18:18:26 +0000 (18:18 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 23 Apr 2015 18:18:26 +0000 (18:18 +0000)
commitb8b2ed6529f176db7832d1e2a69fae55fa336bc8
tree5f28e2ae2097fd91edda3c0900da7a321e32dabe
parent1ef49218b31145c6b0d1d1095a4be2103c93e4ce
[modules] Determine the set of macros exported by a submodule at the end of that submodule.

Previously we'd defer this determination until writing the AST, which doesn't
allow us to use this information when building other submodules of the same
module. This change also allows us to use a uniform mechanism for writing
module macro records, independent of whether they are local or imported.

llvm-svn: 235614
12 files changed:
clang/include/clang/Lex/ExternalPreprocessorSource.h
clang/include/clang/Lex/MacroInfo.h
clang/include/clang/Lex/Preprocessor.h
clang/lib/Frontend/PrintPreprocessedOutput.cpp
clang/lib/Lex/MacroInfo.cpp
clang/lib/Lex/PPDirectives.cpp
clang/lib/Lex/PPLexerChange.cpp
clang/lib/Lex/PPMacroExpansion.cpp
clang/lib/Lex/Preprocessor.cpp
clang/lib/Sema/SemaCodeComplete.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp