From da48260ed46b61865639932c1013b417123b5028 Mon Sep 17 00:00:00 2001 From: Juergen Ributzka Date: Sat, 14 Dec 2013 12:23:14 +0000 Subject: [PATCH] Remove weak vtables. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197323 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 3 +++ lib/CodeGen/AsmPrinter/AsmPrinterHandler.h | 2 +- lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 3 +++ lib/CodeGen/AsmPrinter/DwarfUnit.h | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 5d49831a6f1..f704f7a52ba 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -2256,3 +2256,6 @@ GCMetadataPrinter *AsmPrinter::GetOrCreateGCPrinter(GCStrategy *S) { report_fatal_error("no GCMetadataPrinter registered for GC: " + Twine(Name)); } + +/// Pin vtable to this file. +AsmPrinterHandler::~AsmPrinterHandler() {} diff --git a/lib/CodeGen/AsmPrinter/AsmPrinterHandler.h b/lib/CodeGen/AsmPrinter/AsmPrinterHandler.h index 2e7dcf65a32..2825367abd8 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinterHandler.h +++ b/lib/CodeGen/AsmPrinter/AsmPrinterHandler.h @@ -27,7 +27,7 @@ class MCSymbol; /// or EH information. class AsmPrinterHandler { public: - virtual ~AsmPrinterHandler() {} + virtual ~AsmPrinterHandler(); /// \brief For symbols that have a size designated (e.g. common symbols), /// this tracks that size. diff --git a/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 709f5bec031..87a38912448 100644 --- a/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1998,6 +1998,9 @@ void DwarfUnit::emitHeader(const MCSection *ASection, Asm->EmitInt8(Asm->getDataLayout().getPointerSize()); } +DwarfCompileUnit::~DwarfCompileUnit() {} +DwarfTypeUnit::~DwarfTypeUnit() {} + void DwarfTypeUnit::emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym) const { DwarfUnit::emitHeader(ASection, ASectionSym); diff --git a/lib/CodeGen/AsmPrinter/DwarfUnit.h b/lib/CodeGen/AsmPrinter/DwarfUnit.h index 6242a058cf8..98623db7a61 100644 --- a/lib/CodeGen/AsmPrinter/DwarfUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfUnit.h @@ -500,6 +500,7 @@ class DwarfCompileUnit : public DwarfUnit { public: DwarfCompileUnit(unsigned UID, DIE *D, DICompileUnit Node, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU); + virtual ~DwarfCompileUnit() LLVM_OVERRIDE; /// createGlobalVariableDIE - create global variable DIE. void createGlobalVariableDIE(DIGlobalVariable GV); @@ -520,6 +521,7 @@ private: public: DwarfTypeUnit(unsigned UID, DIE *D, uint16_t Language, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU); + virtual ~DwarfTypeUnit() LLVM_OVERRIDE; void setTypeSignature(uint64_t Signature) { TypeSignature = Signature; } void setType(const DIE *Ty) { this->Ty = Ty; }