aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein.wu@gmail.com>2025-03-28 15:31:21 +0100
committerGitHub <noreply@github.com>2025-03-28 15:31:21 +0100
commitdb04c3e4b3d9b79d99c5bbeb7fffaa887cd4352e (patch)
tree3a6b9a89affe8d4464ae6a696aa3c9db8565fcf6 /clang/lib/Frontend/FrontendAction.cpp
parent1f90a88b80998e595a3a11a7d13c333dbfa8777a (diff)
downloadllvm-db04c3e4b3d9b79d99c5bbeb7fffaa887cd4352e.zip
llvm-db04c3e4b3d9b79d99c5bbeb7fffaa887cd4352e.tar.gz
llvm-db04c3e4b3d9b79d99c5bbeb7fffaa887cd4352e.tar.bz2
[clang] Implement some missing interfaces for DelegatingDeserializationListener (#133424)
Split from the https://github.com/llvm/llvm-project/pull/133395 per the review comment. This patch also moves the `DelegatingDeserializationListener` close to `ASTDeserializationListener`.
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 9f789f0..f6ad7c8 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -49,52 +49,6 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry)
namespace {
-class DelegatingDeserializationListener : public ASTDeserializationListener {
- ASTDeserializationListener *Previous;
- bool DeletePrevious;
-
-public:
- explicit DelegatingDeserializationListener(
- ASTDeserializationListener *Previous, bool DeletePrevious)
- : Previous(Previous), DeletePrevious(DeletePrevious) {}
- ~DelegatingDeserializationListener() override {
- if (DeletePrevious)
- delete Previous;
- }
-
- DelegatingDeserializationListener(const DelegatingDeserializationListener &) =
- delete;
- DelegatingDeserializationListener &
- operator=(const DelegatingDeserializationListener &) = delete;
-
- void ReaderInitialized(ASTReader *Reader) override {
- if (Previous)
- Previous->ReaderInitialized(Reader);
- }
- void IdentifierRead(serialization::IdentifierID ID,
- IdentifierInfo *II) override {
- if (Previous)
- Previous->IdentifierRead(ID, II);
- }
- void TypeRead(serialization::TypeIdx Idx, QualType T) override {
- if (Previous)
- Previous->TypeRead(Idx, T);
- }
- void DeclRead(GlobalDeclID ID, const Decl *D) override {
- if (Previous)
- Previous->DeclRead(ID, D);
- }
- void SelectorRead(serialization::SelectorID ID, Selector Sel) override {
- if (Previous)
- Previous->SelectorRead(ID, Sel);
- }
- void MacroDefinitionRead(serialization::PreprocessedEntityID PPID,
- MacroDefinitionRecord *MD) override {
- if (Previous)
- Previous->MacroDefinitionRead(PPID, MD);
- }
-};
-
/// Dumps deserialized declarations.
class DeserializedDeclsDumper : public DelegatingDeserializationListener {
public: