Skip to content

Commit 022039e

Browse files
[SPIRV] Fix a warning
This patch fixes: llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp:642:16: error: unused variable 'StructSize' [-Werror,-Wunused-variable]
1 parent 3d7a3a1 commit 022039e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@ bool SPIRVEmitIntrinsics::walkLogicalAccessChain(
641641
} else if (StructType *ST = dyn_cast<StructType>(CurType)) {
642642
uint32_t StructSize = DL.getTypeSizeInBits(ST) / 8;
643643
assert(Offset < StructSize);
644+
(void)StructSize;
644645
const auto &STL = DL.getStructLayout(ST);
645646
unsigned Element = STL->getElementContainingOffset(Offset);
646647
Offset -= STL->getElementOffset(Element);

0 commit comments

Comments
 (0)