From 46a9f016c5fca708710e8c791675354cbf51fdfa Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 20 Jan 2012 21:51:11 +0000 Subject: More dead code removal (using -Wunreachable-code) llvm-svn: 148578 --- llvm/lib/VMCore/Metadata.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/VMCore/Metadata.cpp') 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. -- cgit v1.2.3