summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitd6514b1e13dd87b9790c3eed70cdb82157d59392 (patch)
tree7c7159698ccda4e094b14d1863727457ce24199a /llvm/lib/VMCore/Metadata.cpp
parent5fa88d4e3047c169e6f5d33da99972ca15f0a21d (diff)
downloadbcm5719-llvm-d6514b1e13dd87b9790c3eed70cdb82157d59392.tar.gz
bcm5719-llvm-d6514b1e13dd87b9790c3eed70cdb82157d59392.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. llvm-svn: 93980
Diffstat (limited to 'llvm/lib/VMCore/Metadata.cpp')
-rw-r--r--llvm/lib/VMCore/Metadata.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/Metadata.cpp b/llvm/lib/VMCore/Metadata.cpp
index 822dbd9521d..b4a981f3a02 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<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;
OpenPOWER on IntegriCloud