aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2024-04-25 11:43:13 +0800
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>2024-04-25 14:14:05 +0800
commit42070a5c092ed420bf92ebf38229c594885e94c7 (patch)
tree843afa1cc0c179d42d2dc0ed8a2dada5964a6734 /clang/lib/Frontend/FrontendAction.cpp
parentc2a98fdeb3aede1a8db492a6ea30f4fa85b60edc (diff)
downloadllvm-42070a5c092ed420bf92ebf38229c594885e94c7.zip
llvm-42070a5c092ed420bf92ebf38229c594885e94c7.tar.gz
llvm-42070a5c092ed420bf92ebf38229c594885e94c7.tar.bz2
[NFC] [Serialization] Avoid using DeclID directly as much as possible
This patch tries to remove all the direct use of DeclID except the real low level reading and writing. All the use of DeclID is converted to the use of LocalDeclID or GlobalDeclID. This is helpful to increase the readability and type safety.
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 91ce16e..a2af738 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -80,7 +80,7 @@ public:
if (Previous)
Previous->TypeRead(Idx, T);
}
- void DeclRead(DeclID ID, const Decl *D) override {
+ void DeclRead(GlobalDeclID ID, const Decl *D) override {
if (Previous)
Previous->DeclRead(ID, D);
}
@@ -102,7 +102,7 @@ public:
bool DeletePrevious)
: DelegatingDeserializationListener(Previous, DeletePrevious) {}
- void DeclRead(DeclID ID, const Decl *D) override {
+ void DeclRead(GlobalDeclID ID, const Decl *D) override {
llvm::outs() << "PCH DECL: " << D->getDeclKindName();
if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
llvm::outs() << " - ";
@@ -128,7 +128,7 @@ public:
: DelegatingDeserializationListener(Previous, DeletePrevious), Ctx(Ctx),
NamesToCheck(NamesToCheck) {}
- void DeclRead(DeclID ID, const Decl *D) override {
+ void DeclRead(GlobalDeclID ID, const Decl *D) override {
if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
if (NamesToCheck.find(ND->getNameAsString()) != NamesToCheck.end()) {
unsigned DiagID