Skip to content

Commit 54ee962

Browse files
committed
[NVPTX] Fix unused var warning with asserts disabled
<...>/llvm-project/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp:191:15: warning: unused variable ‘ASC’ [-Wunused-variable] 191 | if (auto *ASC = dyn_cast<AddrSpaceCastInst>(I.OldInstruction)) { | ^~~
1 parent 30bbfda commit 54ee962

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ static void convertToParamAS(Value *OldUser, Value *Param) {
190190
}
191191
if (auto *ASC = dyn_cast<AddrSpaceCastInst>(I.OldInstruction)) {
192192
assert(ASC->getDestAddressSpace() == ADDRESS_SPACE_PARAM);
193+
(void)ASC;
193194
// Just pass through the argument, the old ASC is no longer needed.
194195
return I.NewParam;
195196
}

0 commit comments

Comments
 (0)