[llvm] 98183da - [Transforms] Fix an unused variable warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 10 11:59:14 PDT 2023
Author: Kazu Hirata
Date: 2023-06-10T11:57:48-07:00
New Revision: 98183da637d87ea7a7450f8fb5ae23153a846a6f
URL: https://github.com/llvm/llvm-project/commit/98183da637d87ea7a7450f8fb5ae23153a846a6f
DIFF: https://github.com/llvm/llvm-project/commit/98183da637d87ea7a7450f8fb5ae23153a846a6f.diff
LOG: [Transforms] Fix an unused variable warning
This patch fixes:
llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp:415:18: error: unused
variable 'StBuff' [-Werror,-Wunused-variable]
Added:
Modified:
llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp b/llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp
index 9e1ed4c296448..22c5408269ecb 100644
--- a/llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp
+++ b/llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp
@@ -415,6 +415,7 @@ callBufferedPrintfArgPush(IRBuilder<> &Builder, ArrayRef<Value *> Args,
StoreInst *StBuff = Builder.CreateStore(toStore, PtrToStore);
LLVM_DEBUG(dbgs() << "inserting store to printf buffer:" << *StBuff
<< '\n');
+ (void)StBuff;
PtrToStore = Builder.CreateConstInBoundsGEP1_32(
Builder.getInt8Ty(), PtrToStore,
M->getDataLayout().getTypeAllocSize(toStore->getType()),
More information about the llvm-commits
mailing list