summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/Record.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/TableGen/Record.cpp')
-rw-r--r--llvm/lib/TableGen/Record.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index c032bc19251..ba3f7235536 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -404,12 +404,8 @@ RecTy *llvm::resolveTypes(RecTy *T1, RecTy *T2) {
++i) {
RecordRecTy *SuperRecTy1 = RecordRecTy::get(*i);
RecTy *NewType1 = resolveTypes(SuperRecTy1, T2);
- if (NewType1) {
- if (NewType1 != SuperRecTy1) {
- delete SuperRecTy1;
- }
+ if (NewType1)
return NewType1;
- }
}
}
if (RecordRecTy *RecTy2 = dyn_cast<RecordRecTy>(T2)) {
@@ -422,12 +418,8 @@ RecTy *llvm::resolveTypes(RecTy *T1, RecTy *T2) {
++i) {
RecordRecTy *SuperRecTy2 = RecordRecTy::get(*i);
RecTy *NewType2 = resolveTypes(T1, SuperRecTy2);
- if (NewType2) {
- if (NewType2 != SuperRecTy2) {
- delete SuperRecTy2;
- }
+ if (NewType2)
return NewType2;
- }
}
}
return nullptr;
OpenPOWER on IntegriCloud