From: Pete Cooper Date: Fri, 26 Jun 2015 19:23:20 +0000 (+0000) Subject: Wrap assert loops in #ifndef NDEBUG X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a5d25f61ae93e088a103442614a6fa3444176735;p=oota-llvm.git Wrap assert loops in #ifndef NDEBUG The body of the loops here only contained asserts. This triggered an unused variable warning on release builds and -Werror on the bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240819 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index e90d45eec60..c0d7871bf08 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1165,6 +1165,7 @@ void SelectionDAGLegalize::LegalizeOp(SDNode *Node) { if (Node->getOpcode() == ISD::TargetConstant) // Allow illegal target nodes. return; +#ifndef NDEBUG for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) assert(TLI.getTypeAction(*DAG.getContext(), Node->getValueType(i)) == TargetLowering::TypeLegal && @@ -1175,6 +1176,7 @@ void SelectionDAGLegalize::LegalizeOp(SDNode *Node) { Op.getValueType()) == TargetLowering::TypeLegal || Op.getOpcode() == ISD::TargetConstant) && "Unexpected illegal type!"); +#endif // Figure out the correct action; the way to query this varies by opcode TargetLowering::LegalizeAction Action = TargetLowering::Legal;