aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
-rw-r--r--clang/lib/Sema/SemaModule.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaModule.cpp b/clang/lib/Sema/SemaModule.cpp
index 0606b3a4..a829693 100644
--- a/clang/lib/Sema/SemaModule.cpp
+++ b/clang/lib/Sema/SemaModule.cpp
@@ -514,6 +514,11 @@ DeclResult Sema::ActOnModuleImport(SourceLocation StartLoc,
assert(ThisModule && "was expecting a module if building one");
}
+ // In some cases we need to know if an entity was present in a directly-
+ // imported module (as opposed to a transitive import). This avoids
+ // searching both Imports and Exports.
+ DirectModuleImports.insert(Mod);
+
return Import;
}