aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Metadata.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-01-20 06:01:02 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-01-20 06:01:02 +0000
commit9520cc2eae199f8974d5ed4f89ec43468be8f128 (patch)
tree4846388a3583bde9a44516897c940778ed48deef /lib/VMCore/Metadata.cpp
parentf58c34d5315a35d489c5c203ae45430ccb53f973 (diff)
downloadexternal_llvm-9520cc2eae199f8974d5ed4f89ec43468be8f128.tar.gz
external_llvm-9520cc2eae199f8974d5ed4f89ec43468be8f128.tar.bz2
external_llvm-9520cc2eae199f8974d5ed4f89ec43468be8f128.zip
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
Diffstat (limited to 'lib/VMCore/Metadata.cpp')
-rw-r--r--lib/VMCore/Metadata.cpp6
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;