mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-20 14:29:27 +00:00
Don't leak memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37442 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a1a9f408da
commit
8f862c80bc
@ -158,11 +158,14 @@ Value* GVNPRE::phi_translate(ValueTable& VN, std::set<Value*, ExprLT>& MS,
|
||||
Value* newVal = BinaryOperator::create(BO->getOpcode(),
|
||||
newOp1, newOp2,
|
||||
BO->getName()+".gvnpre");
|
||||
add(VN, MS, newVal);
|
||||
if (!find_leader(VN, set, VN[newVal]))
|
||||
|
||||
if (!find_leader(VN, set, VN[newVal])) {
|
||||
add(VN, MS, newVal);
|
||||
return newVal;
|
||||
else
|
||||
} else {
|
||||
delete newVal;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} else if (PHINode* P = dyn_cast<PHINode>(V)) {
|
||||
if (P->getParent() == pred->getTerminator()->getSuccessor(0))
|
||||
|
Loading…
x
Reference in New Issue
Block a user