Rephrase loop so it doesn't leave unused bools around in Release mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212102 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2014-07-01 14:46:44 +00:00
parent 4551671908
commit 4232f4e605

View File

@ -508,15 +508,13 @@ void Decoder::decodeOpcodes(ArrayRef<ulittle8_t> Opcodes, unsigned Offset,
bool Terminated = false;
for (unsigned OI = Offset, OE = Opcodes.size(); !Terminated && OI < OE; ) {
bool Decoded = false;
for (unsigned DI = 0, DE = array_lengthof(Ring); DI < DE; ++DI) {
for (unsigned DI = 0;; ++DI) {
if ((Opcodes[OI] & Ring[DI].Mask) == Ring[DI].Value) {
Terminated = (this->*Ring[DI].Routine)(Opcodes.data(), OI, 0, Prologue);
Decoded = true;
break;
}
assert(DI < array_lengthof(Ring) && "unhandled opcode");
}
assert(Decoded && "unhandled opcode");
}
}