]> granicus.if.org Git - clang/commit
Modular Codegen: Add/use a bit in serialized function definitions to track whether...
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 11 Apr 2017 20:46:34 +0000 (20:46 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 11 Apr 2017 20:46:34 +0000 (20:46 +0000)
commit94c1c6bb447e920a3e82b24347115b7f855994b2
tree782c33d9e860a97faa6cde3a8ab080fa65ac240f
parent8f1ece045641420bd0b5489a83367ffd25b02b1d
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
19 files changed:
include/clang/AST/ASTContext.h
include/clang/AST/ExternalASTSource.h
include/clang/Basic/Module.h
include/clang/Sema/MultiplexExternalSemaSource.h
include/clang/Serialization/ASTReader.h
lib/AST/ASTContext.cpp
lib/AST/ExternalASTSource.cpp
lib/Basic/Module.cpp
lib/Sema/MultiplexExternalSemaSource.cpp
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriter.cpp
lib/Serialization/ASTWriterDecl.cpp
test/Modules/Inputs/codegen-nodep/foo.h [new file with mode: 0644]
test/Modules/Inputs/codegen-nodep/foo.modulemap [new file with mode: 0644]
test/Modules/Inputs/codegen/foo.h
test/Modules/Inputs/codegen/use.cpp [new file with mode: 0644]
test/Modules/codegen-nodep.test [new file with mode: 0644]
test/Modules/codegen.test