diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-12-20 02:48:34 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-12-20 02:48:34 +0000 |
commit | 99ba9e3bd70671f3441fb974895f226a83ce0e66 (patch) | |
tree | 8345d41be8d8a7c5b452dcb423f9251c435e0025 /lib/AST/Decl.cpp | |
parent | f6702a3927147655206ae729a84339c4fda4c651 (diff) |
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 305c41c51c..9028a09bc3 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -624,6 +624,8 @@ static void clearLinkageForClass(const CXXRecordDecl *record) { } } +void NamedDecl::anchor() { } + void NamedDecl::ClearLinkageCache() { // Note that we can't skip clearing the linkage of children just // because the parent doesn't have cached linkage: we don't cache @@ -2424,6 +2426,8 @@ void TagDecl::setTemplateParameterListsInfo(ASTContext &Context, // EnumDecl Implementation //===----------------------------------------------------------------------===// +void EnumDecl::anchor() { } + EnumDecl *EnumDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, @@ -2587,10 +2591,14 @@ SourceRange BlockDecl::getSourceRange() const { // Other Decl Allocation/Deallocation Method Implementations //===----------------------------------------------------------------------===// +void TranslationUnitDecl::anchor() { } + TranslationUnitDecl *TranslationUnitDecl::Create(ASTContext &C) { return new (C) TranslationUnitDecl(C); } +void LabelDecl::anchor() { } + LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation IdentL, IdentifierInfo *II) { return new (C) LabelDecl(DC, IdentL, II, 0, IdentL); @@ -2603,6 +2611,7 @@ LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC, return new (C) LabelDecl(DC, IdentL, II, 0, GnuLabelL); } +void NamespaceDecl::anchor() { } NamespaceDecl *NamespaceDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, @@ -2615,6 +2624,10 @@ NamespaceDecl *NamespaceDecl::getNextNamespace() { NextNamespace.get(getASTContext().getExternalSource())); } +void ValueDecl::anchor() { } + +void ImplicitParamDecl::anchor() { } + ImplicitParamDecl *ImplicitParamDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation IdLoc, IdentifierInfo *Id, @@ -2649,6 +2662,8 @@ EnumConstantDecl *EnumConstantDecl::Create(ASTContext &C, EnumDecl *CD, return new (C) EnumConstantDecl(CD, L, Id, T, E, V); } +void IndirectFieldDecl::anchor() { } + IndirectFieldDecl * IndirectFieldDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType T, NamedDecl **CH, @@ -2663,12 +2678,16 @@ SourceRange EnumConstantDecl::getSourceRange() const { return SourceRange(getLocation(), End); } +void TypeDecl::anchor() { } + TypedefDecl *TypedefDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, TypeSourceInfo *TInfo) { return new (C) TypedefDecl(DC, StartLoc, IdLoc, Id, TInfo); } +void TypedefNameDecl::anchor() { } + TypeAliasDecl *TypeAliasDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, @@ -2692,6 +2711,8 @@ SourceRange TypeAliasDecl::getSourceRange() const { return SourceRange(getLocStart(), RangeEnd); } +void FileScopeAsmDecl::anchor() { } + FileScopeAsmDecl *FileScopeAsmDecl::Create(ASTContext &C, DeclContext *DC, StringLiteral *Str, SourceLocation AsmLoc, |