summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-06-26 19:23:20 +0000
committerPete Cooper <peter_cooper@apple.com>2015-06-26 19:23:20 +0000
commitaf61ac71e25ff79dea3b9a71d2f4aadb9e2cd29e (patch)
treeba764b66a6ea9c2a45bb27f53323ece291ae0375 /llvm
parentbaf5f87b6c95ededb5482b7b50fd9b810aeea02c (diff)
downloadbcm5719-llvm-af61ac71e25ff79dea3b9a71d2f4aadb9e2cd29e.tar.gz
bcm5719-llvm-af61ac71e25ff79dea3b9a71d2f4aadb9e2cd29e.zip
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. llvm-svn: 240819
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index e90d45eec60..c0d7871bf08 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud