summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Metadata.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-01-20 21:51:11 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-01-20 21:51:11 +0000
commit46a9f016c5fca708710e8c791675354cbf51fdfa (patch)
tree63642aaaa31ba6bc3ee7ee892cccee1bf17f5abc /llvm/lib/VMCore/Metadata.cpp
parente4d798f07897a6378d0f2588e4c2335ec85ca935 (diff)
downloadbcm5719-llvm-46a9f016c5fca708710e8c791675354cbf51fdfa.tar.gz
bcm5719-llvm-46a9f016c5fca708710e8c791675354cbf51fdfa.zip
More dead code removal (using -Wunreachable-code)
llvm-svn: 148578
Diffstat (limited to 'llvm/lib/VMCore/Metadata.cpp')
-rw-r--r--llvm/lib/VMCore/Metadata.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Metadata.cpp b/llvm/lib/VMCore/Metadata.cpp
index 993df41b469..5d6eb144c3e 100644
--- a/llvm/lib/VMCore/Metadata.cpp
+++ b/llvm/lib/VMCore/Metadata.cpp
@@ -163,12 +163,13 @@ static const Function *assertLocalFunction(const MDNode *N) {
const Function *MDNode::getFunction() const {
#ifndef NDEBUG
return assertLocalFunction(this);
-#endif
+#else
if (!isFunctionLocal()) return NULL;
for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
if (const Function *F = getFunctionForValue(getOperand(i)))
return F;
return NULL;
+#endif
}
// destroy - Delete this node. Only when there are no uses.
OpenPOWER on IntegriCloud