summaryrefslogtreecommitdiff
path: root/lib/Lex/PPLexerChange.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-04-23 22:58:06 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-04-23 22:58:06 +0000
commitb58f3164d3e1e1ce89dc6d7650a5b4f9638d7bea (patch)
treecf90139801c39dd831c4255f2066833fd24f2871 /lib/Lex/PPLexerChange.cpp
parent9fad2a17ff307677e2fd386d6c14bb904950cfe9 (diff)
[modules] Properly attribute macros to modules if they're in a file textually included into a file in the module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235661 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPLexerChange.cpp')
-rw-r--r--lib/Lex/PPLexerChange.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/PPLexerChange.cpp b/lib/Lex/PPLexerChange.cpp
index 33f5ff07f0..8a74a95ab3 100644
--- a/lib/Lex/PPLexerChange.cpp
+++ b/lib/Lex/PPLexerChange.cpp
@@ -633,7 +633,7 @@ void Preprocessor::LeaveSubmodule() {
for (auto *MD = Macro.second.getLatest(); MD != State.getLatest();
MD = MD->getPrevious()) {
// Skip macros defined in other submodules we #included along the way.
- Module *Mod = getModuleForLocation(MD->getLocation());
+ Module *Mod = getModuleContainingLocation(MD->getLocation());
if (Mod != Info.M)
continue;