Skip to content

Commit 872d2b4

Browse files
author
Greg Roth
committed
[SPIRV] Mark maybe unused extractSubvector variable
Change llvm#115178 introduced a variable that is only used in an assert, which could result in an unused variable warning in builds without asserts enabled. This just addes the maybe_unused attribute to silence the warning.
1 parent e8c07f7 commit 872d2b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2941,7 +2941,7 @@ void SPIRVInstructionSelector::extractSubvector(
29412941
Register &ResVReg, const SPIRVType *ResType, Register &ReadReg,
29422942
MachineInstr &InsertionPoint) const {
29432943
SPIRVType *InputType = GR.getResultType(ReadReg);
2944-
uint64_t InputSize = GR.getScalarOrVectorComponentCount(InputType);
2944+
[[maybe_unused]] uint64_t InputSize = GR.getScalarOrVectorComponentCount(InputType);
29452945
uint64_t ResultSize = GR.getScalarOrVectorComponentCount(ResType);
29462946
assert(InputSize > 1 && "The input must be a vector.");
29472947
assert(ResultSize > 1 && "The result must be a vector.");

0 commit comments

Comments
 (0)