[globalisel][tablegen] Change method of squashing unused variable warnings following post-commit comments.

llvm-svn: 307659
This commit is contained in:
Daniel Sanders 2017-07-11 14:23:14 +00:00
parent 959de71249
commit be9a2e2c84
1 changed files with 4 additions and 2 deletions

View File

@ -30,13 +30,14 @@ bool InstructionSelector::executeMatchTable(
while (true) {
switch (*Command++) {
case GIM_RecordInsn: {
int64_t NewInsnID LLVM_ATTRIBUTE_UNUSED = *Command++;
int64_t NewInsnID = *Command++;
int64_t InsnID = *Command++;
int64_t OpIdx = *Command++;
// As an optimisation we require that MIs[0] is always the root. Refuse
// any attempt to modify it.
assert(NewInsnID != 0 && "Refusing to modify MIs[0]");
(void)NewInsnID;
MachineOperand &MO = State.MIs[InsnID]->getOperand(OpIdx);
if (!MO.isReg()) {
@ -203,10 +204,11 @@ bool InstructionSelector::executeMatchTable(
break;
}
case GIR_BuildMI: {
int64_t InsnID LLVM_ATTRIBUTE_UNUSED = *Command++;
int64_t InsnID = *Command++;
int64_t Opcode = *Command++;
assert((size_t)InsnID == OutMIs.size() &&
"Expected to store MIs in order");
(void)InsnID;
OutMIs.push_back(BuildMI(*State.MIs[0]->getParent(), State.MIs[0],
State.MIs[0]->getDebugLoc(), TII.get(Opcode)));
DEBUG(dbgs() << "GIR_BuildMI(OutMIs[" << InsnID << "], " << Opcode