diff --git a/clang/include/clang/AST/DeclCXX.h b/clang/include/clang/AST/DeclCXX.h index 58e01bf0f051..84528067012b 100644 --- a/clang/include/clang/AST/DeclCXX.h +++ b/clang/include/clang/AST/DeclCXX.h @@ -3918,6 +3918,7 @@ class MSPropertyDecl : public DeclaratorDecl { : DeclaratorDecl(MSProperty, DC, L, N, T, TInfo, StartL), GetterId(Getter), SetterId(Setter) {} + void anchor() override; public: friend class ASTDeclReader; diff --git a/clang/include/clang/AST/DeclTemplate.h b/clang/include/clang/AST/DeclTemplate.h index 9e01c4950d75..f6e3d8f300ba 100644 --- a/clang/include/clang/AST/DeclTemplate.h +++ b/clang/include/clang/AST/DeclTemplate.h @@ -751,6 +751,7 @@ class RedeclarableTemplateDecl : public TemplateDecl, return getMostRecentDecl(); } + void anchor() override; protected: template struct SpecEntryTraits { using DeclType = EntryType; diff --git a/clang/include/clang/Lex/ModuleMap.h b/clang/include/clang/Lex/ModuleMap.h index 4daa1dd817b6..a38c8d7819db 100644 --- a/clang/include/clang/Lex/ModuleMap.h +++ b/clang/include/clang/Lex/ModuleMap.h @@ -45,6 +45,8 @@ class SourceManager; /// A mechanism to observe the actions of the module map parser as it /// reads module map files. class ModuleMapCallbacks { + virtual void anchor(); + public: virtual ~ModuleMapCallbacks() = default; diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index 33f159417b71..2893fca859ed 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -2910,6 +2910,8 @@ void DecompositionDecl::printName(llvm::raw_ostream &os) const { os << ']'; } +void MSPropertyDecl::anchor() {} + MSPropertyDecl *MSPropertyDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T, TypeSourceInfo *TInfo, diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp index 04e1803281be..76f29dac1647 100644 --- a/clang/lib/AST/DeclTemplate.cpp +++ b/clang/lib/AST/DeclTemplate.cpp @@ -149,6 +149,8 @@ void *allocateDefaultArgStorageChain(const ASTContext &C) { // RedeclarableTemplateDecl Implementation //===----------------------------------------------------------------------===// +void RedeclarableTemplateDecl::anchor() {} + RedeclarableTemplateDecl::CommonBase *RedeclarableTemplateDecl::getCommonPtr() const { if (Common) return Common; diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index 13d2b728f58c..cff950b703a6 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -54,6 +54,8 @@ using namespace clang; +void ModuleMapCallbacks::anchor() {} + void ModuleMap::resolveLinkAsDependencies(Module *Mod) { auto PendingLinkAs = PendingLinkAsModule.find(Mod->Name); if (PendingLinkAs != PendingLinkAsModule.end()) {