Skip to content

Commit a4b2975

Browse files
committed
[SPIRV] Fix unused-variable warnings (NFC)
/llvm-project/llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp:198:12: error: unused variable 'dstBitWidth' [-Werror,-Wunused-variable] auto dstBitWidth = ^ /llvm-project/llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp:200:12: error: unused variable 'srcBitWidth' [-Werror,-Wunused-variable] auto srcBitWidth = ^ 2 errors generated.
1 parent 716fe1c commit a4b2975

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ class SPIRVLegalizePointerCast : public FunctionPass {
195195
if (DstType->getElementType() != SrcType->getElementType()) {
196196
// Support bitcast between vectors of different sizes only if
197197
// the total bitwidth is the same.
198-
auto dstBitWidth =
198+
[[maybe_unused]] auto dstBitWidth =
199199
DstType->getElementType()->getScalarSizeInBits() * dstNumElements;
200-
auto srcBitWidth =
200+
[[maybe_unused]] auto srcBitWidth =
201201
SrcType->getElementType()->getScalarSizeInBits() * srcNumElements;
202202
assert(dstBitWidth == srcBitWidth &&
203203
"Unsupported bitcast between vectors of different sizes.");

0 commit comments

Comments
 (0)