mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-08 11:37:03 +00:00
[TableGen] Fix a memory leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237774 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
64f9e5908b
commit
ee25444b06
@ -325,7 +325,7 @@ Init *DagRecTy::convertValue(UnOpInit *BO) {
|
||||
Init *L = BO->getOperand()->convertInitializerTo(this);
|
||||
if (!L) return nullptr;
|
||||
if (L != BO->getOperand())
|
||||
return UnOpInit::get(UnOpInit::CAST, L, new DagRecTy);
|
||||
return UnOpInit::get(UnOpInit::CAST, L, DagRecTy::get());
|
||||
return BO;
|
||||
}
|
||||
return nullptr;
|
||||
@ -337,7 +337,7 @@ Init *DagRecTy::convertValue(BinOpInit *BO) {
|
||||
Init *R = BO->getRHS()->convertInitializerTo(this);
|
||||
if (!L || !R) return nullptr;
|
||||
if (L != BO->getLHS() || R != BO->getRHS())
|
||||
return BinOpInit::get(BinOpInit::CONCAT, L, R, new DagRecTy);
|
||||
return BinOpInit::get(BinOpInit::CONCAT, L, R, DagRecTy::get());
|
||||
return BO;
|
||||
}
|
||||
return nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user