diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-04-23 22:58:06 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-04-23 22:58:06 +0000 |
commit | 2a553089c30fc3cda435ffef90bc3d2976d531d1 (patch) | |
tree | 36aaf69b6d024f83b070c4fe887bf75baecc5cb8 /clang/lib/Lex/PPMacroExpansion.cpp | |
parent | 10ed96bf094170f12a49ea5e6be2c43ac8640a18 (diff) | |
download | bcm5719-llvm-2a553089c30fc3cda435ffef90bc3d2976d531d1.tar.gz bcm5719-llvm-2a553089c30fc3cda435ffef90bc3d2976d531d1.zip |
[modules] Properly attribute macros to modules if they're in a file textually included into a file in the module.
llvm-svn: 235661
Diffstat (limited to 'clang/lib/Lex/PPMacroExpansion.cpp')
-rw-r--r-- | clang/lib/Lex/PPMacroExpansion.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 54f72f64628..174718f4385 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -60,12 +60,12 @@ void Preprocessor::appendMacroDirective(IdentifierInfo *II, MacroDirective *MD){ // Accumulate any overridden imported macros. if (!MD->isImported() && getCurrentModule()) { - Module *OwningMod = getModuleForLocation(MD->getLocation()); + Module *OwningMod = getModuleContainingLocation(MD->getLocation()); if (!OwningMod) return; for (auto *PrevMD = OldMD; PrevMD; PrevMD = PrevMD->getPrevious()) { - Module *DirectiveMod = getModuleForLocation(PrevMD->getLocation()); + Module *DirectiveMod = getModuleContainingLocation(PrevMD->getLocation()); if (ModuleMacro *PrevMM = PrevMD->getOwningModuleMacro()) StoredMD.addOverriddenMacro(*this, PrevMM); else if (ModuleMacro *PrevMM = getModuleMacro(DirectiveMod, II)) |