aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
diff options
context:
space:
mode:
authorThurston Dang <thurston@google.com>2024-11-06 20:49:39 +0000
committerThurston Dang <thurston@google.com>2024-11-06 20:49:39 +0000
commit4a6d13bf4db63f4cd845d38128c79c17bbf8d99c (patch)
tree688acea7f664f05ba97a0aaaa65b5791f42a269a /llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
parente9bafa35d27042f8e1daa4ccf4a30bddf31878e8 (diff)
downloadllvm-4a6d13bf4db63f4cd845d38128c79c17bbf8d99c.zip
llvm-4a6d13bf4db63f4cd845d38128c79c17bbf8d99c.tar.gz
llvm-4a6d13bf4db63f4cd845d38128c79c17bbf8d99c.tar.bz2
Remove unused variable to fix '[AMDGPU] modify named barrier builtins and intrinsics (#114550)'
https://github.com/llvm/llvm-project/pull/114550 caused a buildbot breakage (https://lab.llvm.org/buildbot/#/builders/66/builds/5853) because of an unused variable. This patch attempts to fix forward: /home/b/sanitizer-x86_64-linux/build/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp:106:24: error: variable 'TTy' set but not used [-Werror,-Wunused-but-set-variable] 106 | if (TargetExtType *TTy = AMDGPU::isNamedBarrier(GV)) { | ^
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
index f524764..ac11b11 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
@@ -103,7 +103,7 @@ unsigned AMDGPUMachineFunction::allocateLDSGlobal(const DataLayout &DL,
unsigned Offset;
if (GV.getAddressSpace() == AMDGPUAS::LOCAL_ADDRESS) {
- if (TargetExtType *TTy = AMDGPU::isNamedBarrier(GV)) {
+ if (AMDGPU::isNamedBarrier(GV)) {
std::optional<unsigned> BarAddr = getLDSAbsoluteAddress(GV);
if (!BarAddr)
llvm_unreachable("named barrier should have an assigned address");