[llvm] r235481 - [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.
Craig Topper
craig.topper at gmail.com
Tue Apr 21 22:27:11 PDT 2015
Author: ctopper
Date: Wed Apr 22 00:27:11 2015
New Revision: 235481
URL: http://llvm.org/viewvc/llvm-project?rev=235481&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/TableGen/Record.cpp
Modified: llvm/trunk/lib/TableGen/Record.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/Record.cpp?rev=235481&r1=235480&r2=235481&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/Record.cpp (original)
+++ llvm/trunk/lib/TableGen/Record.cpp Wed Apr 22 00:27:11 2015
@@ -404,12 +404,8 @@ RecTy *llvm::resolveTypes(RecTy *T1, Rec
++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, Rec
++i) {
RecordRecTy *SuperRecTy2 = RecordRecTy::get(*i);
RecTy *NewType2 = resolveTypes(T1, SuperRecTy2);
- if (NewType2) {
- if (NewType2 != SuperRecTy2) {
- delete SuperRecTy2;
- }
+ if (NewType2)
return NewType2;
- }
}
}
return nullptr;
More information about the llvm-commits
mailing list