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 | |
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')
42 files changed, 289 insertions, 3 deletions
diff --git a/lib/AST/AttrImpl.cpp b/lib/AST/AttrImpl.cpp index 3ca7d4d01d..cffcc6501e 100644 --- a/lib/AST/AttrImpl.cpp +++ b/lib/AST/AttrImpl.cpp @@ -19,4 +19,8 @@ using namespace clang; Attr::~Attr() { } +void InheritableAttr::anchor() { } + +void InheritableParamAttr::anchor() { } + #include "clang/AST/AttrImpl.inc" 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, diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp index b86cf28118..ddb61e5950 100644 --- a/lib/AST/DeclCXX.cpp +++ b/lib/AST/DeclCXX.cpp @@ -28,6 +28,8 @@ using namespace clang; // Decl Allocation/Deallocation Method Implementations //===----------------------------------------------------------------------===// +void AccessSpecDecl::anchor() { } + CXXRecordDecl::DefinitionData::DefinitionData(CXXRecordDecl *D) : UserDeclaredConstructor(false), UserDeclaredCopyConstructor(false), UserDeclaredMoveConstructor(false), UserDeclaredCopyAssignment(false), @@ -1155,6 +1157,8 @@ bool CXXRecordDecl::mayBeAbstract() const { return false; } +void CXXMethodDecl::anchor() { } + CXXMethodDecl * CXXMethodDecl::Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, @@ -1404,6 +1408,8 @@ SourceRange CXXCtorInitializer::getSourceRange() const { return SourceRange(getSourceLocation(), getRParenLoc()); } +void CXXConstructorDecl::anchor() { } + CXXConstructorDecl * CXXConstructorDecl::Create(ASTContext &C, EmptyShell Empty) { return new (C) CXXConstructorDecl(0, SourceLocation(), DeclarationNameInfo(), @@ -1548,6 +1554,8 @@ CXXConstructorDecl::setInheritedConstructor(const CXXConstructorDecl *BaseCtor){ addOverriddenMethod(BaseCtor); } +void CXXDestructorDecl::anchor() { } + CXXDestructorDecl * CXXDestructorDecl::Create(ASTContext &C, EmptyShell Empty) { return new (C) CXXDestructorDecl(0, SourceLocation(), DeclarationNameInfo(), @@ -1567,6 +1575,8 @@ CXXDestructorDecl::Create(ASTContext &C, CXXRecordDecl *RD, isImplicitlyDeclared); } +void CXXConversionDecl::anchor() { } + CXXConversionDecl * CXXConversionDecl::Create(ASTContext &C, EmptyShell Empty) { return new (C) CXXConversionDecl(0, SourceLocation(), DeclarationNameInfo(), @@ -1589,6 +1599,8 @@ CXXConversionDecl::Create(ASTContext &C, CXXRecordDecl *RD, EndLocation); } +void LinkageSpecDecl::anchor() { } + LinkageSpecDecl *LinkageSpecDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation ExternLoc, @@ -1598,6 +1610,8 @@ LinkageSpecDecl *LinkageSpecDecl::Create(ASTContext &C, return new (C) LinkageSpecDecl(DC, ExternLoc, LangLoc, Lang, RBraceLoc); } +void UsingDirectiveDecl::anchor() { } + UsingDirectiveDecl *UsingDirectiveDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, SourceLocation NamespaceLoc, @@ -1618,6 +1632,8 @@ NamespaceDecl *UsingDirectiveDecl::getNominatedNamespace() { return cast_or_null<NamespaceDecl>(NominatedNamespace); } +void NamespaceAliasDecl::anchor() { } + NamespaceAliasDecl *NamespaceAliasDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, SourceLocation AliasLoc, @@ -1631,6 +1647,8 @@ NamespaceAliasDecl *NamespaceAliasDecl::Create(ASTContext &C, DeclContext *DC, QualifierLoc, IdentLoc, Namespace); } +void UsingShadowDecl::anchor() { } + UsingDecl *UsingShadowDecl::getUsingDecl() const { const UsingShadowDecl *Shadow = this; while (const UsingShadowDecl *NextShadow = @@ -1639,6 +1657,8 @@ UsingDecl *UsingShadowDecl::getUsingDecl() const { return cast<UsingDecl>(Shadow->UsingOrNextShadow); } +void UsingDecl::anchor() { } + void UsingDecl::addShadowDecl(UsingShadowDecl *S) { assert(std::find(shadow_begin(), shadow_end(), S) == shadow_end() && "declaration already in set"); @@ -1676,6 +1696,8 @@ UsingDecl *UsingDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation UL, return new (C) UsingDecl(DC, UL, QualifierLoc, NameInfo, IsTypeNameArg); } +void UnresolvedUsingValueDecl::anchor() { } + UnresolvedUsingValueDecl * UnresolvedUsingValueDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, @@ -1685,6 +1707,8 @@ UnresolvedUsingValueDecl::Create(ASTContext &C, DeclContext *DC, QualifierLoc, NameInfo); } +void UnresolvedUsingTypenameDecl::anchor() { } + UnresolvedUsingTypenameDecl * UnresolvedUsingTypenameDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, @@ -1697,6 +1721,8 @@ UnresolvedUsingTypenameDecl::Create(ASTContext &C, DeclContext *DC, TargetName.getAsIdentifierInfo()); } +void StaticAssertDecl::anchor() { } + StaticAssertDecl *StaticAssertDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation StaticAssertLoc, Expr *AssertExpr, diff --git a/lib/AST/DeclFriend.cpp b/lib/AST/DeclFriend.cpp index 99bfe40c31..e44333effa 100644 --- a/lib/AST/DeclFriend.cpp +++ b/lib/AST/DeclFriend.cpp @@ -16,6 +16,8 @@ #include "clang/AST/DeclTemplate.h" using namespace clang; +void FriendDecl::anchor() { } + FriendDecl *FriendDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, FriendUnion Friend, diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 18be26def9..2960b13d6d 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -46,6 +46,8 @@ void ObjCProtocolList::set(ObjCProtocolDecl* const* InList, unsigned Elts, // ObjCInterfaceDecl //===----------------------------------------------------------------------===// +void ObjCContainerDecl::anchor() { } + /// getIvarDecl - This method looks up an ivar in this ContextDecl. /// ObjCIvarDecl * @@ -147,6 +149,8 @@ ObjCContainerDecl::FindPropertyDeclaration(IdentifierInfo *PropertyId) const { return 0; } +void ObjCInterfaceDecl::anchor() { } + /// FindPropertyVisibleInPrimaryClass - Finds declaration of the property /// with name 'PropertyId' in the primary class; including those in protocols /// (direct or indirect) used by the primary class. @@ -876,6 +880,8 @@ bool ObjCInterfaceDecl::ClassImplementsProtocol(ObjCProtocolDecl *lProto, // ObjCIvarDecl //===----------------------------------------------------------------------===// +void ObjCIvarDecl::anchor() { } + ObjCIvarDecl *ObjCIvarDecl::Create(ASTContext &C, ObjCContainerDecl *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, @@ -946,6 +952,8 @@ const ObjCInterfaceDecl *ObjCIvarDecl::getContainingInterface() const { // ObjCAtDefsFieldDecl //===----------------------------------------------------------------------===// +void ObjCAtDefsFieldDecl::anchor() { } + ObjCAtDefsFieldDecl *ObjCAtDefsFieldDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, @@ -957,6 +965,8 @@ ObjCAtDefsFieldDecl // ObjCProtocolDecl //===----------------------------------------------------------------------===// +void ObjCProtocolDecl::anchor() { } + ObjCProtocolDecl *ObjCProtocolDecl::Create(ASTContext &C, DeclContext *DC, IdentifierInfo *Id, SourceLocation nameLoc, @@ -1026,6 +1036,8 @@ SourceRange ObjCClassDecl::getSourceRange() const { // ObjCForwardProtocolDecl //===----------------------------------------------------------------------===// +void ObjCForwardProtocolDecl::anchor() { } + ObjCForwardProtocolDecl:: ObjCForwardProtocolDecl(DeclContext *DC, SourceLocation L, ObjCProtocolDecl *const *Elts, unsigned nElts, @@ -1048,6 +1060,8 @@ ObjCForwardProtocolDecl::Create(ASTContext &C, DeclContext *DC, // ObjCCategoryDecl //===----------------------------------------------------------------------===// +void ObjCCategoryDecl::anchor() { } + ObjCCategoryDecl *ObjCCategoryDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation AtLoc, SourceLocation ClassNameLoc, @@ -1089,6 +1103,8 @@ void ObjCCategoryDecl::setImplementation(ObjCCategoryImplDecl *ImplD) { // ObjCCategoryImplDecl //===----------------------------------------------------------------------===// +void ObjCCategoryImplDecl::anchor() { } + ObjCCategoryImplDecl * ObjCCategoryImplDecl::Create(ASTContext &C, DeclContext *DC, IdentifierInfo *Id, @@ -1108,6 +1124,8 @@ ObjCCategoryDecl *ObjCCategoryImplDecl::getCategoryDecl() const { } +void ObjCImplDecl::anchor() { } + void ObjCImplDecl::addPropertyImplementation(ObjCPropertyImplDecl *property) { // FIXME: The context should be correct before we get here. property->setLexicalDeclContext(this); @@ -1170,6 +1188,8 @@ raw_ostream &clang::operator<<(raw_ostream &OS, // ObjCImplementationDecl //===----------------------------------------------------------------------===// +void ObjCImplementationDecl::anchor() { } + ObjCImplementationDecl * ObjCImplementationDecl::Create(ASTContext &C, DeclContext *DC, ObjCInterfaceDecl *ClassInterface, @@ -1203,6 +1223,8 @@ raw_ostream &clang::operator<<(raw_ostream &OS, // ObjCCompatibleAliasDecl //===----------------------------------------------------------------------===// +void ObjCCompatibleAliasDecl::anchor() { } + ObjCCompatibleAliasDecl * ObjCCompatibleAliasDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, @@ -1215,6 +1237,8 @@ ObjCCompatibleAliasDecl::Create(ASTContext &C, DeclContext *DC, // ObjCPropertyDecl //===----------------------------------------------------------------------===// +void ObjCPropertyDecl::anchor() { } + ObjCPropertyDecl *ObjCPropertyDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, diff --git a/lib/AST/DeclTemplate.cpp b/lib/AST/DeclTemplate.cpp index 558a4ccac9..a2d5a2d70d 100644 --- a/lib/AST/DeclTemplate.cpp +++ b/lib/AST/DeclTemplate.cpp @@ -537,6 +537,8 @@ SourceLocation NonTypeTemplateParmDecl::getDefaultArgumentLoc() const { // TemplateTemplateParmDecl Method Implementations //===----------------------------------------------------------------------===// +void TemplateTemplateParmDecl::anchor() { } + TemplateTemplateParmDecl * TemplateTemplateParmDecl::Create(const ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, unsigned P, @@ -582,6 +584,12 @@ FunctionTemplateSpecializationInfo::Create(ASTContext &C, FunctionDecl *FD, } //===----------------------------------------------------------------------===// +// TemplateDecl Implementation +//===----------------------------------------------------------------------===// + +void TemplateDecl::anchor() { } + +//===----------------------------------------------------------------------===// // ClassTemplateSpecializationDecl Implementation //===----------------------------------------------------------------------===// ClassTemplateSpecializationDecl:: @@ -682,6 +690,8 @@ ClassTemplateSpecializationDecl::getSourceRange() const { //===----------------------------------------------------------------------===// // ClassTemplatePartialSpecializationDecl Implementation //===----------------------------------------------------------------------===// +void ClassTemplatePartialSpecializationDecl::anchor() { } + ClassTemplatePartialSpecializationDecl:: ClassTemplatePartialSpecializationDecl(ASTContext &Context, TagKind TK, DeclContext *DC, @@ -749,6 +759,8 @@ ClassTemplatePartialSpecializationDecl::Create(ASTContext &Context, // FriendTemplateDecl Implementation //===----------------------------------------------------------------------===// +void FriendTemplateDecl::anchor() { } + FriendTemplateDecl *FriendTemplateDecl::Create(ASTContext &Context, DeclContext *DC, SourceLocation L, @@ -796,3 +808,8 @@ TypeAliasTemplateDecl::newCommon(ASTContext &C) { return CommonPtr; } +//===----------------------------------------------------------------------===// +// ClassScopeFunctionSpecializationDecl Implementation +//===----------------------------------------------------------------------===// + +void ClassScopeFunctionSpecializationDecl::anchor() { } diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp index 1bbf8494fa..285d38cbdf 100644 --- a/lib/AST/ExprCXX.cpp +++ b/lib/AST/ExprCXX.cpp @@ -1023,4 +1023,4 @@ TemplateArgument SubstNonTypeTemplateParmPackExpr::getArgumentPack() const { return TemplateArgument(Arguments, NumArguments); } - +void ArrayTypeTraitExpr::anchor() { } diff --git a/lib/AST/Mangle.cpp b/lib/AST/Mangle.cpp index 5cb8f47519..68e0098c1a 100644 --- a/lib/AST/Mangle.cpp +++ b/lib/AST/Mangle.cpp @@ -59,6 +59,8 @@ static void checkMangleDC(const DeclContext *DC, const BlockDecl *BD) { } +void MangleContext::anchor() { } + void MangleContext::mangleGlobalBlock(const BlockDecl *BD, raw_ostream &Out) { Out << "__block_global_" << getBlockId(BD, false); diff --git a/lib/Analysis/Dominators.cpp b/lib/Analysis/Dominators.cpp new file mode 100644 index 0000000000..0e02c6d717 --- /dev/null +++ b/lib/Analysis/Dominators.cpp @@ -0,0 +1,14 @@ +//=- Dominators.cpp - Implementation of dominators tree for Clang CFG C++ -*-=// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "clang/Analysis/Analyses/Dominators.h" + +using namespace clang; + +void DominatorTree::anchor() { } diff --git a/lib/Analysis/LiveVariables.cpp b/lib/Analysis/LiveVariables.cpp index 3a325009d4..ff6607d51a 100644 --- a/lib/Analysis/LiveVariables.cpp +++ b/lib/Analysis/LiveVariables.cpp @@ -143,6 +143,8 @@ namespace { } } +void LiveVariables::Observer::anchor() { } + LiveVariables::LivenessValues LiveVariablesImpl::merge(LiveVariables::LivenessValues valsA, LiveVariables::LivenessValues valsB) { diff --git a/lib/Analysis/PostOrderCFGView.cpp b/lib/Analysis/PostOrderCFGView.cpp index 311423f285..cfd66f7aa1 100644 --- a/lib/Analysis/PostOrderCFGView.cpp +++ b/lib/Analysis/PostOrderCFGView.cpp @@ -15,6 +15,8 @@ using namespace clang; +void PostOrderCFGView::anchor() { } + PostOrderCFGView::PostOrderCFGView(const CFG *cfg) { Blocks.reserve(cfg->getNumBlockIDs()); CFGBlockSet BSet(cfg); diff --git a/lib/Analysis/ReachableCode.cpp b/lib/Analysis/ReachableCode.cpp index 62575f9f23..bb63e2c184 100644 --- a/lib/Analysis/ReachableCode.cpp +++ b/lib/Analysis/ReachableCode.cpp @@ -251,7 +251,9 @@ void DeadCodeScan::reportDeadCode(const Stmt *S, } namespace clang { namespace reachable_code { - + +void Callback::anchor() { } + unsigned ScanReachableFromBlock(const CFGBlock *Start, llvm::BitVector &Reachable) { unsigned count = 0; diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp index 1643572159..67ea056417 100644 --- a/lib/Basic/Diagnostic.cpp +++ b/lib/Basic/Diagnostic.cpp @@ -825,6 +825,8 @@ StoredDiagnostic::~StoredDiagnostic() { } /// reported by DiagnosticsEngine. bool DiagnosticConsumer::IncludeInDiagnosticCounts() const { return true; } +void IgnoringDiagConsumer::anchor() { } + PartialDiagnostic::StorageAllocator::StorageAllocator() { for (unsigned I = 0; I != NumCached; ++I) FreeList[I] = Cached + I; diff --git a/lib/Basic/FileSystemStatCache.cpp b/lib/Basic/FileSystemStatCache.cpp index c8b07af295..875d397a1d 100644 --- a/lib/Basic/FileSystemStatCache.cpp +++ b/lib/Basic/FileSystemStatCache.cpp @@ -28,6 +28,8 @@ using namespace clang; #define S_ISDIR(s) ((_S_IFDIR & s) !=0) #endif +void FileSystemStatCache::anchor() { } + /// FileSystemStatCache::get - Get the 'stat' information for the specified /// path, using the cache to accelerate it if possible. This returns true if /// the path does not exist or false if it exists. diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp index 2ddcc3e5dc..eedfc57a10 100644 --- a/lib/CodeGen/CodeGenAction.cpp +++ b/lib/CodeGen/CodeGenAction.cpp @@ -33,6 +33,7 @@ using namespace llvm; namespace clang { class BackendConsumer : public ASTConsumer { + virtual void anchor(); DiagnosticsEngine &Diags; BackendAction Action; const CodeGenOptions &CodeGenOpts; @@ -180,6 +181,8 @@ namespace clang { void InlineAsmDiagHandler2(const llvm::SMDiagnostic &, SourceLocation LocCookie); }; + + void BackendConsumer::anchor() {} } /// ConvertBackendLocation - Convert a location in a temporary llvm::SourceMgr @@ -406,20 +409,26 @@ void CodeGenAction::ExecuteAction() { // +void EmitAssemblyAction::anchor() { } EmitAssemblyAction::EmitAssemblyAction(llvm::LLVMContext *_VMContext) : CodeGenAction(Backend_EmitAssembly, _VMContext) {} +void EmitBCAction::anchor() { } EmitBCAction::EmitBCAction(llvm::LLVMContext *_VMContext) : CodeGenAction(Backend_EmitBC, _VMContext) {} +void EmitLLVMAction::anchor() { } EmitLLVMAction::EmitLLVMAction(llvm::LLVMContext *_VMContext) : CodeGenAction(Backend_EmitLL, _VMContext) {} +void EmitLLVMOnlyAction::anchor() { } EmitLLVMOnlyAction::EmitLLVMOnlyAction(llvm::LLVMContext *_VMContext) : CodeGenAction(Backend_EmitNothing, _VMContext) {} +void EmitCodeGenOnlyAction::anchor() { } EmitCodeGenOnlyAction::EmitCodeGenOnlyAction(llvm::LLVMContext *_VMContext) : CodeGenAction(Backend_EmitMCNull, _VMContext) {} +void EmitObjAction::anchor() { } EmitObjAction::EmitObjAction(llvm::LLVMContext *_VMContext) : CodeGenAction(Backend_EmitObj, _VMContext) {} diff --git a/lib/CodeGen/ModuleBuilder.cpp b/lib/CodeGen/ModuleBuilder.cpp index 30572ed9af..8aa788d9a1 100644 --- a/lib/CodeGen/ModuleBuilder.cpp +++ b/lib/CodeGen/ModuleBuilder.cpp @@ -113,6 +113,8 @@ namespace { }; } +void CodeGenerator::anchor() { } + CodeGenerator *clang::CreateLLVMCodeGen(DiagnosticsEngine &Diags, const std::string& ModuleName, const CodeGenOptions &CGO, diff --git a/lib/Driver/Action.cpp b/lib/Driver/Action.cpp index 52c0dbb5f1..a9dc17b320 100644 --- a/lib/Driver/Action.cpp +++ b/lib/Driver/Action.cpp @@ -38,14 +38,20 @@ const char *Action::getClassName(ActionClass AC) { llvm_unreachable("invalid class"); } +void InputAction::anchor() {} + InputAction::InputAction(const Arg &_Input, types::ID _Type) : Action(InputClass, _Type), Input(_Input) { } +void BindArchAction::anchor() {} + BindArchAction::BindArchAction(Action *Input, const char *_ArchName) : Action(BindArchClass, Input, Input->getType()), ArchName(_ArchName) { } +void JobAction::anchor() {} + JobAction::JobAction(ActionClass Kind, Action *Input, types::ID Type) : Action(Kind, Input, Type) { } @@ -54,38 +60,56 @@ JobAction::JobAction(ActionClass Kind, const ActionList &Inputs, types::ID Type) : Action(Kind, Inputs, Type) { } +void PreprocessJobAction::anchor() {} + |