Skip to content

Commit 4845424

Browse files
[SPIRV] Fix a warning
This patch fixes: llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp:245:25: error: unused variable 'TII' [-Werror,-Wunused-variable]
1 parent 47efff7 commit 4845424

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ void SPIRVGlobalRegistry::invalidateMachineInstr(MachineInstr *MI) {
242242
// remove.
243243

244244
const SPIRVSubtarget &ST = MI->getMF()->getSubtarget<SPIRVSubtarget>();
245-
const SPIRVInstrInfo *TII = ST.getInstrInfo();
245+
[[maybe_unused]] const SPIRVInstrInfo *TII = ST.getInstrInfo();
246246
assert(!TII->isAliasingInstr(*MI) &&
247247
"Cannot invalidate aliasing instructions.");
248248
assert(MI->getOpcode() != SPIRV::OpFunction &&

0 commit comments

Comments
 (0)