[Preprocessor] Iterating over all macros should include those from modules.
So, iterate over the list of macros mentioned in modules, and make sure those are in the master table. This isn't particularly efficient, but hopefully it's something that isn't done too often. PR23929 and rdar://problem/21480635 llvm-svn: 240571
This commit is contained in:
@@ -286,6 +286,10 @@ Preprocessor::macro_begin(bool IncludeExternalMacros) const {
|
||||
ExternalSource->ReadDefinedMacros();
|
||||
}
|
||||
|
||||
// Make sure we cover all macros in visible modules.
|
||||
for (const ModuleMacro &Macro : ModuleMacros)
|
||||
CurSubmoduleState->Macros.insert(std::make_pair(Macro.II, MacroState()));
|
||||
|
||||
return CurSubmoduleState->Macros.begin();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user