[llvm] 54ee962 - [NVPTX] Fix unused var warning with asserts disabled
David Spickett via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 29 01:56:01 PDT 2021
Author: David Spickett
Date: 2021-04-29T09:54:03+01:00
New Revision: 54ee962e4795cd00a379e560727dff7ea0743765
URL: https://github.com/llvm/llvm-project/commit/54ee962e4795cd00a379e560727dff7ea0743765
DIFF: https://github.com/llvm/llvm-project/commit/54ee962e4795cd00a379e560727dff7ea0743765.diff
LOG: [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)) {
| ^~~
Added:
Modified:
llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp b/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
index 6da420b8e0dd5..8458a0bc3003c 100644
--- a/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
@@ -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;
}
More information about the llvm-commits
mailing list