[llvm] 94e0c46 - [RISCV] Remove an unnecessary cast (NFC) (#156600)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 3 07:48:48 PDT 2025


Author: Kazu Hirata
Date: 2025-09-03T07:48:44-07:00
New Revision: 94e0c46498e061d8d40774417ce121904c8c4524

URL: https://github.com/llvm/llvm-project/commit/94e0c46498e061d8d40774417ce121904c8c4524
DIFF: https://github.com/llvm/llvm-project/commit/94e0c46498e061d8d40774417ce121904c8c4524.diff

LOG: [RISCV] Remove an unnecessary cast (NFC) (#156600)

*MF is already non const.

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp b/llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp
index 51ea3fc5f6774..7df1b7e580002 100644
--- a/llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp
+++ b/llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp
@@ -1158,8 +1158,8 @@ bool RISCVInstructionSelector::selectAddr(MachineInstr &MI,
 
   switch (TM.getCodeModel()) {
   default: {
-    reportGISelFailure(const_cast<MachineFunction &>(*MF), *TPC, *MORE,
-                       getName(), "Unsupported code model for lowering", MI);
+    reportGISelFailure(*MF, *TPC, *MORE, getName(),
+                       "Unsupported code model for lowering", MI);
     return false;
   }
   case CodeModel::Small: {


        


More information about the llvm-commits mailing list