summaryrefslogtreecommitdiffstats
path: root/lib/MC
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-11-18 09:31:53 +0000
committerAlexey Samsonov <samsonov@google.com>2013-11-18 09:31:53 +0000
commitb21ab43cfc3fa0dacf5c95f04e58b6d804b59a16 (patch)
tree12f522231a5b3a875b1ac733a5bf1b1025088c7c /lib/MC
parent69b2447b6a3fcc303e03cba8c7c50d745b0284d2 (diff)
downloadexternal_llvm-b21ab43cfc3fa0dacf5c95f04e58b6d804b59a16.zip
external_llvm-b21ab43cfc3fa0dacf5c95f04e58b6d804b59a16.tar.gz
external_llvm-b21ab43cfc3fa0dacf5c95f04e58b6d804b59a16.tar.bz2
Revert r194865 and r194874.
This change is incorrect. If you delete virtual destructor of both a base class and a subclass, then the following code: Base *foo = new Child(); delete foo; will not cause the destructor for members of Child class. As a result, I observe plently of memory leaks. Notable examples I investigated are: ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194997 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r--lib/MC/MCAtom.cpp3
-rw-r--r--lib/MC/MCStreamer.cpp2
-rw-r--r--lib/MC/WinCOFFObjectWriter.cpp5
3 files changed, 1 insertions, 9 deletions
diff --git a/lib/MC/MCAtom.cpp b/lib/MC/MCAtom.cpp
index 3da1ba3..d0a64c3 100644
--- a/lib/MC/MCAtom.cpp
+++ b/lib/MC/MCAtom.cpp
@@ -14,9 +14,6 @@
using namespace llvm;
-// pin vtable to this file
-void MCAtom::anchor() {}
-
void MCAtom::remap(uint64_t NewBegin, uint64_t NewEnd) {
Parent->remap(this, NewBegin, NewEnd);
}
diff --git a/lib/MC/MCStreamer.cpp b/lib/MC/MCStreamer.cpp
index 0616a4d..2be89e9 100644
--- a/lib/MC/MCStreamer.cpp
+++ b/lib/MC/MCStreamer.cpp
@@ -22,9 +22,7 @@
#include <cstdlib>
using namespace llvm;
-// pin vtables to this file
MCTargetStreamer::~MCTargetStreamer() {}
-void ARMTargetStreamer::anchor() {}
MCStreamer::MCStreamer(MCContext &Ctx, MCTargetStreamer *TargetStreamer)
: Context(Ctx), TargetStreamer(TargetStreamer), EmitEHFrame(true),
diff --git a/lib/MC/WinCOFFObjectWriter.cpp b/lib/MC/WinCOFFObjectWriter.cpp
index 270456c..3252317 100644
--- a/lib/MC/WinCOFFObjectWriter.cpp
+++ b/lib/MC/WinCOFFObjectWriter.cpp
@@ -138,7 +138,7 @@ public:
symbol_map SymbolMap;
WinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW, raw_ostream &OS);
- virtual ~WinCOFFObjectWriter();
+ ~WinCOFFObjectWriter();
COFFSymbol *createSymbol(StringRef Name);
COFFSymbol *GetOrCreateCOFFSymbol(const MCSymbol * Symbol);
@@ -898,9 +898,6 @@ MCWinCOFFObjectTargetWriter::MCWinCOFFObjectTargetWriter(unsigned Machine_) :
Machine(Machine_) {
}
-// pin vtable to this file
-void MCWinCOFFObjectTargetWriter::anchor() {}
-
//------------------------------------------------------------------------------
// WinCOFFObjectWriter factory function