diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-11-18 09:31:53 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-11-18 09:31:53 +0000 |
commit | b21ab43cfc3fa0dacf5c95f04e58b6d804b59a16 (patch) | |
tree | 12f522231a5b3a875b1ac733a5bf1b1025088c7c /lib/Target/SystemZ | |
parent | 69b2447b6a3fcc303e03cba8c7c50d745b0284d2 (diff) | |
download | llvm-b21ab43cfc3fa0dacf5c95f04e58b6d804b59a16.tar.gz llvm-b21ab43cfc3fa0dacf5c95f04e58b6d804b59a16.tar.bz2 llvm-b21ab43cfc3fa0dacf5c95f04e58b6d804b59a16.tar.xz |
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/Target/SystemZ')
-rw-r--r-- | lib/Target/SystemZ/CMakeLists.txt | 1 | ||||
-rw-r--r-- | lib/Target/SystemZ/SystemZInstrInfo.cpp | 5 | ||||
-rw-r--r-- | lib/Target/SystemZ/SystemZInstrInfo.h | 1 | ||||
-rw-r--r-- | lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp | 17 | ||||
-rw-r--r-- | lib/Target/SystemZ/SystemZMachineFunctionInfo.h | 2 | ||||
-rw-r--r-- | lib/Target/SystemZ/SystemZSubtarget.cpp | 3 | ||||
-rw-r--r-- | lib/Target/SystemZ/SystemZSubtarget.h | 1 |
7 files changed, 1 insertions, 29 deletions
diff --git a/lib/Target/SystemZ/CMakeLists.txt b/lib/Target/SystemZ/CMakeLists.txt index d21c0a8086..8a4eaa35e9 100644 --- a/lib/Target/SystemZ/CMakeLists.txt +++ b/lib/Target/SystemZ/CMakeLists.txt @@ -21,7 +21,6 @@ add_llvm_target(SystemZCodeGen SystemZISelLowering.cpp SystemZInstrInfo.cpp SystemZLongBranch.cpp - SystemZMachineFunctionInfo.cpp SystemZMCInstLower.cpp SystemZRegisterInfo.cpp SystemZSelectionDAGInfo.cpp diff --git a/lib/Target/SystemZ/SystemZInstrInfo.cpp b/lib/Target/SystemZ/SystemZInstrInfo.cpp index 67aacf3551..2ebbc0d81a 100644 --- a/lib/Target/SystemZ/SystemZInstrInfo.cpp +++ b/lib/Target/SystemZ/SystemZInstrInfo.cpp @@ -17,7 +17,7 @@ #include "llvm/CodeGen/LiveVariables.h" #include "llvm/CodeGen/MachineRegisterInfo.h" -#define GET_INSTRINFO_CTOR_DTOR +#define GET_INSTRINFO_CTOR #define GET_INSTRMAP_INFO #include "SystemZGenInstrInfo.inc" @@ -37,9 +37,6 @@ static bool isHighReg(unsigned int Reg) { return false; } -// pin vtable to this file -void SystemZInstrInfo::anchor() {} - SystemZInstrInfo::SystemZInstrInfo(SystemZTargetMachine &tm) : SystemZGenInstrInfo(SystemZ::ADJCALLSTACKDOWN, SystemZ::ADJCALLSTACKUP), RI(tm), TM(tm) { diff --git a/lib/Target/SystemZ/SystemZInstrInfo.h b/lib/Target/SystemZ/SystemZInstrInfo.h index be4c8fe2ad..7978be42c9 100644 --- a/lib/Target/SystemZ/SystemZInstrInfo.h +++ b/lib/Target/SystemZ/SystemZInstrInfo.h @@ -127,7 +127,6 @@ class SystemZInstrInfo : public SystemZGenInstrInfo { void emitGRX32Move(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, DebugLoc DL, unsigned DestReg, unsigned SrcReg, unsigned LowLowOpcode, unsigned Size, bool KillSrc) const; - virtual void anchor(); public: explicit SystemZInstrInfo(SystemZTargetMachine &TM); diff --git a/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp b/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp deleted file mode 100644 index 00572d0b9d..0000000000 --- a/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp +++ /dev/null @@ -1,17 +0,0 @@ -//== SystemZMachineFuctionInfo.cpp - SystemZ machine function info-*- C++ -*-=// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "SystemZMachineFunctionInfo.h" - -using namespace llvm; - - -// pin vtable to this file -void SystemZMachineFunctionInfo::anchor() {} - diff --git a/lib/Target/SystemZ/SystemZMachineFunctionInfo.h b/lib/Target/SystemZ/SystemZMachineFunctionInfo.h index 509cef6d64..69c269137e 100644 --- a/lib/Target/SystemZ/SystemZMachineFunctionInfo.h +++ b/lib/Target/SystemZ/SystemZMachineFunctionInfo.h @@ -23,8 +23,6 @@ class SystemZMachineFunctionInfo : public MachineFunctionInfo { unsigned RegSaveFrameIndex; bool ManipulatesSP; - virtual void anchor(); - public: explicit SystemZMachineFunctionInfo(MachineFunction &MF) : LowSavedGPR(0), HighSavedGPR(0), VarArgsFirstGPR(0), VarArgsFirstFPR(0), diff --git a/lib/Target/SystemZ/SystemZSubtarget.cpp b/lib/Target/SystemZ/SystemZSubtarget.cpp index b9a9db2aa7..474192099f 100644 --- a/lib/Target/SystemZ/SystemZSubtarget.cpp +++ b/lib/Target/SystemZ/SystemZSubtarget.cpp @@ -18,9 +18,6 @@ using namespace llvm; -// pin vtabel to this file -void SystemZSubtarget::anchor() {} - SystemZSubtarget::SystemZSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS) diff --git a/lib/Target/SystemZ/SystemZSubtarget.h b/lib/Target/SystemZ/SystemZSubtarget.h index 5817491d45..74d3f90ad7 100644 --- a/lib/Target/SystemZ/SystemZSubtarget.h +++ b/lib/Target/SystemZ/SystemZSubtarget.h @@ -26,7 +26,6 @@ class GlobalValue; class StringRef; class SystemZSubtarget : public SystemZGenSubtargetInfo { - virtual void anchor(); protected: bool HasDistinctOps; bool HasLoadStoreOnCond; |