From d926a49c80b3157073435c1d4c638942cd71a65c Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Mon, 19 Oct 2026 13:24:23 +0200 Subject: [PATCH] Revert "[clang] Add API to iterate already loaded specializations" The APIs were used in the DeclUnloader until commit 642c6a5562, but are now not needed anymore. This reverts the Clang patch added by commit 1324b32fd16e0616afa2f100d9cfe2cfc2e3f15f. --- .../clang/include/clang/AST/DeclTemplate.h | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/interpreter/llvm-project/clang/include/clang/AST/DeclTemplate.h b/interpreter/llvm-project/clang/include/clang/AST/DeclTemplate.h index ead2102f80d79..a4a1bb9c13c79 100644 --- a/interpreter/llvm-project/clang/include/clang/AST/DeclTemplate.h +++ b/interpreter/llvm-project/clang/include/clang/AST/DeclTemplate.h @@ -1079,20 +1079,6 @@ class FunctionTemplateDecl : public RedeclarableTemplateDecl { return makeSpecIterator(getSpecializations(), true); } - /// All specializations that that have already been loaded, ie avoiding - /// deserialization of lazily registered specializations. - spec_range loaded_specializations() const { - return spec_range(loaded_spec_begin(), loaded_spec_end()); - } - - spec_iterator loaded_spec_begin() const { - return makeSpecIterator(getCommonPtr()->Specializations, false); - } - - spec_iterator loaded_spec_end() const { - return makeSpecIterator(getCommonPtr()->Specializations, true); - } - /// Return whether this function template is an abbreviated function template, /// e.g. `void foo(auto x)` or `template void foo(auto x)` bool isAbbreviated() const { @@ -2469,20 +2455,6 @@ class ClassTemplateDecl : public RedeclarableTemplateDecl { return makeSpecIterator(getSpecializations(), true); } - /// All specializations that that have already been loaded, ie avoiding - /// deserialization of lazily registered specializations. - spec_range loaded_specializations() const { - return spec_range(loaded_spec_begin(), loaded_spec_end()); - } - - spec_iterator loaded_spec_begin() const { - return makeSpecIterator(getCommonPtr()->Specializations, false); - } - - spec_iterator loaded_spec_end() const { - return makeSpecIterator(getCommonPtr()->Specializations, true); - } - // Implement isa/cast/dyncast support static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classofKind(Kind K) { return K == ClassTemplate; } @@ -3212,20 +3184,6 @@ class VarTemplateDecl : public RedeclarableTemplateDecl { return makeSpecIterator(getSpecializations(), true); } - /// All specializations that that have already been loaded, ie avoiding - /// deserialization of lazily registered specializations. - spec_range loaded_specializations() const { - return spec_range(loaded_spec_begin(), loaded_spec_end()); - } - - spec_iterator loaded_spec_begin() const { - return makeSpecIterator(getCommonPtr()->Specializations, false); - } - - spec_iterator loaded_spec_end() const { - return makeSpecIterator(getCommonPtr()->Specializations, true); - } - // Implement isa/cast/dyncast support static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classofKind(Kind K) { return K == VarTemplate; }