[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)) {
      |               ^~~
This commit is contained in:
David Spickett 2021-04-29 09:54:03 +01:00
parent 30bbfda01f
commit 54ee962e47

View File

@ -190,6 +190,7 @@ static void convertToParamAS(Value *OldUser, Value *Param) {
}
if (auto *ASC = dyn_cast<AddrSpaceCastInst>(I.OldInstruction)) {
assert(ASC->getDestAddressSpace() == ADDRESS_SPACE_PARAM);
(void)ASC;
// Just pass through the argument, the old ASC is no longer needed.
return I.NewParam;
}