[all-commits] [llvm/llvm-project] c2a98f: [NFC] Move DeclID from serialization/ASTBitCodes.h...
Chuanqi Xu via All-commits
all-commits at lists.llvm.org
Wed Apr 24 22:53:43 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c2a98fdeb3aede1a8db492a6ea30f4fa85b60edc
https://github.com/llvm/llvm-project/commit/c2a98fdeb3aede1a8db492a6ea30f4fa85b60edc
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2024-04-25 (Thu, 25 Apr 2024)
Changed paths:
M clang/include/clang/AST/ASTContext.h
M clang/include/clang/AST/DeclBase.h
A clang/include/clang/AST/DeclID.h
M clang/include/clang/AST/DeclTemplate.h
M clang/include/clang/AST/ExternalASTSource.h
M clang/include/clang/Frontend/ASTUnit.h
M clang/include/clang/Frontend/MultiplexConsumer.h
M clang/include/clang/Sema/MultiplexExternalSemaSource.h
M clang/include/clang/Serialization/ASTBitCodes.h
M clang/include/clang/Serialization/ASTDeserializationListener.h
M clang/include/clang/Serialization/ASTReader.h
M clang/include/clang/Serialization/ASTRecordReader.h
M clang/include/clang/Serialization/ASTWriter.h
M clang/include/clang/Serialization/ModuleFile.h
M clang/lib/AST/ASTContext.cpp
M clang/lib/AST/Decl.cpp
M clang/lib/AST/DeclBase.cpp
M clang/lib/AST/DeclCXX.cpp
M clang/lib/AST/DeclFriend.cpp
M clang/lib/AST/DeclObjC.cpp
M clang/lib/AST/DeclOpenMP.cpp
M clang/lib/AST/DeclTemplate.cpp
M clang/lib/AST/ExternalASTSource.cpp
M clang/lib/Frontend/ASTUnit.cpp
M clang/lib/Frontend/FrontendAction.cpp
M clang/lib/Frontend/MultiplexConsumer.cpp
M clang/lib/Sema/MultiplexExternalSemaSource.cpp
M clang/lib/Serialization/ASTReader.cpp
M clang/lib/Serialization/ASTReaderDecl.cpp
M clang/lib/Serialization/ASTWriter.cpp
M clang/lib/Serialization/ASTWriterDecl.cpp
Log Message:
-----------
[NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID.h (#89873)
Previously, the DeclID is defined in serialization/ASTBitCodes.h under
clang::serialization namespace. However, actually the DeclID is not
purely used in serialization part. The DeclID is already widely used in
AST and all around the clang project via classes like `LazyPtrDecl` or
calling `ExternalASTSource::getExernalDecl()`. All such uses are via the
raw underlying type of `DeclID` as `uint32_t`. This is not pretty good.
This patch moves the DeclID class family to a new header `AST/DeclID.h`
so that the whole project can use the wrapped class `DeclID`,
`GlobalDeclID` and `LocalDeclID` instead of the raw underlying type.
This can improve the readability and the type safety.
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