summaryrefslogtreecommitdiffstats
path: root/lib/Sema/MultiplexExternalSemaSource.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-04-11 20:46:34 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-04-11 20:46:34 +0000
commit94c1c6bb447e920a3e82b24347115b7f855994b2 (patch)
tree782c33d9e860a97faa6cde3a8ab080fa65ac240f /lib/Sema/MultiplexExternalSemaSource.cpp
parent8f1ece045641420bd0b5489a83367ffd25b02b1d (diff)
Modular Codegen: Add/use a bit in serialized function definitions to track whether they are the subject of modular codegen
Some decls are created not where they are written, but in other module files/users (implicit special members and function template implicit specializations). To correctly identify them, use a bit next to the definition to track the modular codegen property. Discussed whether the module file bit could be omitted in favor of reconstituting from the modular codegen decls list - best guess today is that the efficiency improvement of not having to deserialize the whole list whenever any function is queried by a module user is worth it for the small size increase of this redundant (list + bit-on-def) representation. Reviewers: rsmith Differential Revision: https://reviews.llvm.org/D29901 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/MultiplexExternalSemaSource.cpp')
-rw-r--r--lib/Sema/MultiplexExternalSemaSource.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/MultiplexExternalSemaSource.cpp b/lib/Sema/MultiplexExternalSemaSource.cpp
index c97e4dfdd6..f749b7d139 100644
--- a/lib/Sema/MultiplexExternalSemaSource.cpp
+++ b/lib/Sema/MultiplexExternalSemaSource.cpp
@@ -95,9 +95,9 @@ MultiplexExternalSemaSource::GetExternalCXXCtorInitializers(uint64_t Offset) {
}
ExternalASTSource::ExtKind
-MultiplexExternalSemaSource::hasExternalDefinitions(unsigned int ID) {
+MultiplexExternalSemaSource::hasExternalDefinitions(const FunctionDecl *FD) {
for (const auto &S : Sources)
- if (auto EK = S->hasExternalDefinitions(ID))
+ if (auto EK = S->hasExternalDefinitions(FD))
if (EK != EK_ReplyHazy)
return EK;
return EK_ReplyHazy;