This was a cleanup before some other refactoring I wanted to do, but that refactoring has been put on hold for a bit, so I committed this change to improve the codebase a little and not have to redo it later.
On Mon, Dec 31, 2018 at 4:50 PM David Blaikie <dblai...@gmail.com> wrote: > While I realize it's in the coding standard - is there any particular > other motivation for this? (Given you've been doing layering cleanup - I'm > wondering fi this is an interesting workaround for some layering problems, > for instance?) > > On Sat, Dec 29, 2018 at 1:05 PM Richard Trieu via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rtrieu >> Date: Fri Dec 28 18:02:30 2018 >> New Revision: 350143 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=350143&view=rev >> Log: >> Add vtable anchor to classes. >> >> Modified: >> cfe/trunk/include/clang/AST/DeclCXX.h >> cfe/trunk/include/clang/AST/DeclTemplate.h >> cfe/trunk/include/clang/Lex/ModuleMap.h >> cfe/trunk/lib/AST/DeclCXX.cpp >> cfe/trunk/lib/AST/DeclTemplate.cpp >> cfe/trunk/lib/Lex/ModuleMap.cpp >> >> Modified: cfe/trunk/include/clang/AST/DeclCXX.h >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=350143&r1=350142&r2=350143&view=diff >> >> ============================================================================== >> --- cfe/trunk/include/clang/AST/DeclCXX.h (original) >> +++ cfe/trunk/include/clang/AST/DeclCXX.h Fri Dec 28 18:02:30 2018 >> @@ -3918,6 +3918,7 @@ class MSPropertyDecl : public Declarator >> : DeclaratorDecl(MSProperty, DC, L, N, T, TInfo, StartL), >> GetterId(Getter), SetterId(Setter) {} >> >> + void anchor() override; >> public: >> friend class ASTDeclReader; >> >> >> Modified: cfe/trunk/include/clang/AST/DeclTemplate.h >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclTemplate.h?rev=350143&r1=350142&r2=350143&view=diff >> >> ============================================================================== >> --- cfe/trunk/include/clang/AST/DeclTemplate.h (original) >> +++ cfe/trunk/include/clang/AST/DeclTemplate.h Fri Dec 28 18:02:30 2018 >> @@ -751,6 +751,7 @@ class RedeclarableTemplateDecl : public >> return getMostRecentDecl(); >> } >> >> + void anchor() override; >> protected: >> template <typename EntryType> struct SpecEntryTraits { >> using DeclType = EntryType; >> >> Modified: cfe/trunk/include/clang/Lex/ModuleMap.h >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/ModuleMap.h?rev=350143&r1=350142&r2=350143&view=diff >> >> ============================================================================== >> --- cfe/trunk/include/clang/Lex/ModuleMap.h (original) >> +++ cfe/trunk/include/clang/Lex/ModuleMap.h Fri Dec 28 18:02:30 2018 >> @@ -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; >> >> >> Modified: cfe/trunk/lib/AST/DeclCXX.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=350143&r1=350142&r2=350143&view=diff >> >> ============================================================================== >> --- cfe/trunk/lib/AST/DeclCXX.cpp (original) >> +++ cfe/trunk/lib/AST/DeclCXX.cpp Fri Dec 28 18:02:30 2018 >> @@ -2910,6 +2910,8 @@ void DecompositionDecl::printName(llvm:: >> os << ']'; >> } >> >> +void MSPropertyDecl::anchor() {} >> + >> MSPropertyDecl *MSPropertyDecl::Create(ASTContext &C, DeclContext *DC, >> SourceLocation L, DeclarationName >> N, >> QualType T, TypeSourceInfo *TInfo, >> >> Modified: cfe/trunk/lib/AST/DeclTemplate.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclTemplate.cpp?rev=350143&r1=350142&r2=350143&view=diff >> >> ============================================================================== >> --- cfe/trunk/lib/AST/DeclTemplate.cpp (original) >> +++ cfe/trunk/lib/AST/DeclTemplate.cpp Fri Dec 28 18:02:30 2018 >> @@ -149,6 +149,8 @@ void *allocateDefaultArgStorageChain(con >> // RedeclarableTemplateDecl Implementation >> >> >> //===----------------------------------------------------------------------===// >> >> +void RedeclarableTemplateDecl::anchor() {} >> + >> RedeclarableTemplateDecl::CommonBase >> *RedeclarableTemplateDecl::getCommonPtr() const { >> if (Common) >> return Common; >> >> Modified: cfe/trunk/lib/Lex/ModuleMap.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/ModuleMap.cpp?rev=350143&r1=350142&r2=350143&view=diff >> >> ============================================================================== >> --- cfe/trunk/lib/Lex/ModuleMap.cpp (original) >> +++ cfe/trunk/lib/Lex/ModuleMap.cpp Fri Dec 28 18:02:30 2018 >> @@ -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()) { >> >> >> _______________________________________________ >> cfe-commits mailing list >> cfe-commits@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >> >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits