[llvm] r292653 - [globalisel] Fix an unused variable warning when NDEBUG is defined.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 20 13:40:06 PST 2017
Author: dsanders
Date: Fri Jan 20 15:40:05 2017
New Revision: 292653
URL: http://llvm.org/viewvc/llvm-project?rev=292653&view=rev
Log:
[globalisel] Fix an unused variable warning when NDEBUG is defined.
Modified:
llvm/trunk/utils/TableGen/RegisterBankEmitter.cpp
Modified: llvm/trunk/utils/TableGen/RegisterBankEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/RegisterBankEmitter.cpp?rev=292653&r1=292652&r2=292653&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/RegisterBankEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/RegisterBankEmitter.cpp Fri Jan 20 15:40:05 2017
@@ -256,8 +256,8 @@ void RegisterBankEmitter::emitBaseClassI
<< " : RegisterBankInfo(RegBanks, " << TargetName
<< "::NumRegisterBanks) {\n"
<< " // Assert that RegBank indices match their ID's\n"
- << " unsigned Index = 0;\n"
<< "#ifndef NDEBUG\n"
+ << " unsigned Index = 0;\n"
<< " for (const auto &RB : RegBanks)\n"
<< " assert(Index++ == RB->getID() && \"Index != ID\");\n"
<< "#endif // NDEBUG\n"
More information about the llvm-commits
mailing list