From 68e081d606c7e80baa01400a738e118d7bb165b2 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 20 Dec 2011 02:48:34 +0000 Subject: Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146959 --- clang/lib/CodeGen/CodeGenAction.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'clang/lib/CodeGen/CodeGenAction.cpp') diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 2ddcc3e..eedfc57 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/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) {} -- cgit v1.1