From 9520cc2eae199f8974d5ed4f89ec43468be8f128 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Wed, 20 Jan 2010 06:01:02 +0000 Subject: [PATCH] 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 --- lib/VMCore/Metadata.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/VMCore/Metadata.cpp b/lib/VMCore/Metadata.cpp index 822dbd9521d..b4a981f3a02 100644 --- a/lib/VMCore/Metadata.cpp +++ b/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; -- 2.34.1