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

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 28 22:12:23 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-webassembly

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

Local is already of type unsigned.


---
Full diff: https://github.com/llvm/llvm-project/pull/165508.diff


1 Files Affected:

- (modified) llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp (+1-1) 


``````````diff
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

``````````

</details>


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


More information about the llvm-commits mailing list