summaryrefslogtreecommitdiff
path: root/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
commit4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 (patch)
tree9a48fa9f7f51fd635f6807ed7444fcdcad0e9bda /lib/VMCore/Metadata.cpp
parent0041d4d447c26825e566ba38a4fe301471fda1eb (diff)
downloadllvm-4d6ccb5f68cd7c6418a209f1fa4dbade569e4493.tar.gz
llvm-4d6ccb5f68cd7c6418a209f1fa4dbade569e4493.tar.bz2
llvm-4d6ccb5f68cd7c6418a209f1fa4dbade569e4493.tar.xz
More dead code removal (using -Wunreachable-code)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Metadata.cpp')
-rw-r--r--lib/VMCore/Metadata.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Metadata.cpp b/lib/VMCore/Metadata.cpp
index 993df41b46..5d6eb144c3 100644
--- a/lib/VMCore/Metadata.cpp
+++ b/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.