[all-commits] [llvm/llvm-project] 319a51: [Modules] Record whether VarDecl initializers cont...
Henrik G. Olsson via All-commits
all-commits at lists.llvm.org
Mon Jun 23 10:16:52 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 319a51a5ffb807b88ae7f73676894bf306a0d134
https://github.com/llvm/llvm-project/commit/319a51a5ffb807b88ae7f73676894bf306a0d134
Author: Henrik G. Olsson <hnrklssn at gmail.com>
Date: 2025-06-23 (Mon, 23 Jun 2025)
Changed paths:
M clang/include/clang/AST/Decl.h
M clang/include/clang/AST/ExternalASTSource.h
M clang/include/clang/Sema/MultiplexExternalSemaSource.h
M clang/include/clang/Serialization/ASTReader.h
M clang/lib/AST/ASTContext.cpp
M clang/lib/AST/Decl.cpp
M clang/lib/Sema/MultiplexExternalSemaSource.cpp
M clang/lib/Serialization/ASTReader.cpp
M clang/lib/Serialization/ASTReaderDecl.cpp
M clang/lib/Serialization/ASTWriterDecl.cpp
A clang/test/Modules/var-init-side-effects.cpp
Log Message:
-----------
[Modules] Record whether VarDecl initializers contain side effects (#143739)
Calling `DeclMustBeEmitted` should not lead to more deserialization, as
it may occur before previous deserialization has finished.
When passed a `VarDecl` with an initializer however, `DeclMustBeEmitted`
needs to know whether that initializer contains side effects. When the
`VarDecl` is deserialized but the initializer is not, this triggers
deserialization of the initializer. To avoid this we add a bit to the
serialization format for `VarDecl`s, indicating whether its initializer
contains side effects or not, so that the `ASTReader` can query this
information directly without deserializing the initializer.
rdar://153085264
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list