Fix the conditions to unambiguously show the logic they represent. This is the

logic enforced in the test case as well, so hopefully it is correct. Please
review Victor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93980 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth 2010-01-20 06:01:02 +00:00
parent f58c34d531
commit 9520cc2eae

View File

@ -159,10 +159,10 @@ const Function *MDNode::getFunction() const {
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
if (Value *V = getOperand(i)) {
if (MDNode *MD = dyn_cast<MDNode>(V))
if (MDNode *MD = dyn_cast<MDNode>(V)) {
if (const Function *F = MD->getFunction()) return F;
else
return getFunctionForValue(V);
else return getFunctionForValue(V);
}
}
}
return NULL;