diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2010-01-20 06:01:02 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2010-01-20 06:01:02 +0000 |
commit | 9520cc2eae199f8974d5ed4f89ec43468be8f128 (patch) | |
tree | 4846388a3583bde9a44516897c940778ed48deef | |
parent | f58c34d5315a35d489c5c203ae45430ccb53f973 (diff) |
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
-rw-r--r-- | lib/VMCore/Metadata.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/Metadata.cpp b/lib/VMCore/Metadata.cpp index 822dbd9521..b4a981f3a0 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<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; |