diff --git a/llvm/lib/VMCore/Metadata.cpp b/llvm/lib/VMCore/Metadata.cpp index 822dbd9521d289d0ccbf8eb1384befffe6d7d682..b4a981f3a02677339a3479ec786527d16f7d52bd 100644 --- a/llvm/lib/VMCore/Metadata.cpp +++ b/llvm/lib/VMCore/Metadata.cpp @@ -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(V)) + if (MDNode *MD = dyn_cast(V)) { if (const Function *F = MD->getFunction()) return F; - else - return getFunctionForValue(V); + else return getFunctionForValue(V); + } } } return NULL;