diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-04-23 18:18:26 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-04-23 18:18:26 +0000 |
commit | b8b2ed6529f176db7832d1e2a69fae55fa336bc8 (patch) | |
tree | 5f28e2ae2097fd91edda3c0900da7a321e32dabe /clang/lib/Frontend/PrintPreprocessedOutput.cpp | |
parent | 1ef49218b31145c6b0d1d1095a4be2103c93e4ce (diff) | |
download | bcm5719-llvm-b8b2ed6529f176db7832d1e2a69fae55fa336bc8.tar.gz bcm5719-llvm-b8b2ed6529f176db7832d1e2a69fae55fa336bc8.zip |
[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
Diffstat (limited to 'clang/lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r-- | clang/lib/Frontend/PrintPreprocessedOutput.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp index 6507f8e4b66..a2737d5f370 100644 --- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp +++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp @@ -687,7 +687,8 @@ static void DoPrintMacros(Preprocessor &PP, raw_ostream *OS) { for (Preprocessor::macro_iterator I = PP.macro_begin(), E = PP.macro_end(); I != E; ++I) { if (I->first->hasMacroDefinition()) - MacrosByID.push_back(id_macro_pair(I->first, I->second->getMacroInfo())); + MacrosByID.push_back( + id_macro_pair(I->first, I->second.getLatest()->getMacroInfo())); } llvm::array_pod_sort(MacrosByID.begin(), MacrosByID.end(), MacroIDCompare); |