mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
[TableGen] Fix all remaining memory leaks of Init and RecTy objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235696 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -81,7 +81,7 @@ public:
|
||||
|
||||
private:
|
||||
RecTyKind Kind;
|
||||
ListRecTy *ListTy;
|
||||
std::unique_ptr<ListRecTy> ListTy;
|
||||
virtual void anchor();
|
||||
|
||||
public:
|
||||
@@ -566,6 +566,11 @@ class TypedInit : public Init {
|
||||
|
||||
protected:
|
||||
explicit TypedInit(InitKind K, RecTy *T) : Init(K), Ty(T) {}
|
||||
~TypedInit() {
|
||||
// If this is a DefInit we need to delete the RecordRecTy.
|
||||
if (getKind() == IK_DefInit)
|
||||
delete Ty;
|
||||
}
|
||||
|
||||
public:
|
||||
static bool classof(const Init *I) {
|
||||
|
Reference in New Issue
Block a user