[llvm] [WebAssembly] Remove a redundant cast (NFC) (PR #165508)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 28 22:11:52 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/165508

Local is already of type unsigned.


>From 964c527cb9e8638bc4994bc81f6e016f4326da52 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 26 Oct 2025 23:14:32 -0700
Subject: [PATCH] [WebAssembly] Remove a redundant cast (NFC)

Local is already of type unsigned.
---
 llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
index 27f7e1ada1250..5a1779c2c80fb 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
@@ -81,7 +81,7 @@ WebAssemblyFrameLowering::getLocalForStackObject(MachineFunction &MF,
   // Abuse object size to record number of WebAssembly locals allocated to
   // this object.
   MFI.setObjectSize(FrameIndex, ValueVTs.size());
-  return static_cast<unsigned>(Local);
+  return Local;
 }
 
 /// We need a base pointer in the case of having items on the stack that



More information about the llvm-commits mailing list