mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-30 06:19:45 +00:00
[TableGen] Remove some deletes that violate ownership semantics. These don't seem to execute in our codebase today and date back to a time when there was an allocation in this function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235481 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -404,14 +404,10 @@ RecTy *llvm::resolveTypes(RecTy *T1, RecTy *T2) {
|
|||||||
++i) {
|
++i) {
|
||||||
RecordRecTy *SuperRecTy1 = RecordRecTy::get(*i);
|
RecordRecTy *SuperRecTy1 = RecordRecTy::get(*i);
|
||||||
RecTy *NewType1 = resolveTypes(SuperRecTy1, T2);
|
RecTy *NewType1 = resolveTypes(SuperRecTy1, T2);
|
||||||
if (NewType1) {
|
if (NewType1)
|
||||||
if (NewType1 != SuperRecTy1) {
|
|
||||||
delete SuperRecTy1;
|
|
||||||
}
|
|
||||||
return NewType1;
|
return NewType1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (RecordRecTy *RecTy2 = dyn_cast<RecordRecTy>(T2)) {
|
if (RecordRecTy *RecTy2 = dyn_cast<RecordRecTy>(T2)) {
|
||||||
// See if T1 inherits from a type T2 also inherits from
|
// See if T1 inherits from a type T2 also inherits from
|
||||||
const std::vector<Record *> &T2SuperClasses =
|
const std::vector<Record *> &T2SuperClasses =
|
||||||
@@ -422,14 +418,10 @@ RecTy *llvm::resolveTypes(RecTy *T1, RecTy *T2) {
|
|||||||
++i) {
|
++i) {
|
||||||
RecordRecTy *SuperRecTy2 = RecordRecTy::get(*i);
|
RecordRecTy *SuperRecTy2 = RecordRecTy::get(*i);
|
||||||
RecTy *NewType2 = resolveTypes(T1, SuperRecTy2);
|
RecTy *NewType2 = resolveTypes(T1, SuperRecTy2);
|
||||||
if (NewType2) {
|
if (NewType2)
|
||||||
if (NewType2 != SuperRecTy2) {
|
|
||||||
delete SuperRecTy2;
|
|
||||||
}
|
|
||||||
return NewType2;
|
return NewType2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user