[llvm] 4efad49 - [WebAssembly] Use Register instead of unsigned. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 22 22:53:19 PST 2025


Author: Craig Topper
Date: 2025-02-22T22:45:06-08:00
New Revision: 4efad490af2b96af58fc84f7562c9e643b6a160e

URL: https://github.com/llvm/llvm-project/commit/4efad490af2b96af58fc84f7562c9e643b6a160e
DIFF: https://github.com/llvm/llvm-project/commit/4efad490af2b96af58fc84f7562c9e643b6a160e.diff

LOG: [WebAssembly] Use Register instead of unsigned. NFC

Added: 
    

Modified: 
    llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
index 8c9fcdee3375a..2519592f497ae 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
@@ -139,14 +139,14 @@ class WebAssemblyFunctionInfo final : public MachineFunctionInfo {
   }
 
   void initWARegs(MachineRegisterInfo &MRI);
-  void setWAReg(unsigned VReg, unsigned WAReg) {
+  void setWAReg(Register VReg, unsigned WAReg) {
     assert(WAReg != WebAssembly::UnusedReg);
-    auto I = Register(VReg).virtRegIndex();
+    auto I = VReg.virtRegIndex();
     assert(I < WARegs.size());
     WARegs[I] = WAReg;
   }
-  unsigned getWAReg(unsigned VReg) const {
-    auto I = Register(VReg).virtRegIndex();
+  unsigned getWAReg(Register VReg) const {
+    auto I = VReg.virtRegIndex();
     assert(I < WARegs.size());
     return WARegs[I];
   }


        


More information about the llvm-commits mailing list