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 /include/llvm/CodeGen | |
parent | 69b2447b6a3fcc303e03cba8c7c50d745b0284d2 (diff) | |
download | external_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 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/MachineRegisterInfo.h | 3 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineScheduler.h | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h index 58ca907..736a0a2 100644 --- a/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/include/llvm/CodeGen/MachineRegisterInfo.h @@ -30,9 +30,8 @@ class PSetIterator; class MachineRegisterInfo { public: class Delegate { - virtual void anchor(); public: - virtual void MRI_NoteNewVirtualRegister(unsigned Reg) = 0; + virtual void MRI_NoteNewVirtualRegister(unsigned Reg) {} virtual ~Delegate() {} }; diff --git a/include/llvm/CodeGen/MachineScheduler.h b/include/llvm/CodeGen/MachineScheduler.h index 7782895..e6af370 100644 --- a/include/llvm/CodeGen/MachineScheduler.h +++ b/include/llvm/CodeGen/MachineScheduler.h @@ -164,7 +164,6 @@ struct MachineSchedPolicy { /// Initialization sequence: /// initPolicy -> shouldTrackPressure -> initialize(DAG) -> registerRoots class MachineSchedStrategy { - virtual void anchor(); public: virtual ~MachineSchedStrategy() {} @@ -263,7 +262,6 @@ public: /// Mutate the DAG as a postpass after normal DAG building. class ScheduleDAGMutation { - virtual void anchor(); public: virtual ~ScheduleDAGMutation() {} |