[llvm] 36bbea8 - [RISCV] Const correct some methods in RISCVOperand. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 17:46:48 PST 2023


Author: Craig Topper
Date: 2023-03-07T17:46:24-08:00
New Revision: 36bbea8037c58e846c1abc7145b9fa02f6202f06

URL: https://github.com/llvm/llvm-project/commit/36bbea8037c58e846c1abc7145b9fa02f6202f06
DIFF: https://github.com/llvm/llvm-project/commit/36bbea8037c58e846c1abc7145b9fa02f6202f06.diff

LOG: [RISCV] Const correct some methods in RISCVOperand. NFC

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
index a7ba82c95e5f..4abd8f7d8e41 100644
--- a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -554,10 +554,10 @@ struct RISCVOperand final : public MCParsedAsmOperand {
     return IsConstantImm && isUInt<N>(Imm) && VK == RISCVMCExpr::VK_RISCV_None;
   }
 
-  bool isUImm2() { return IsUImm<2>(); }
-  bool isUImm3() { return IsUImm<3>(); }
-  bool isUImm5() { return IsUImm<5>(); }
-  bool isUImm7() { return IsUImm<7>(); }
+  bool isUImm2() const { return IsUImm<2>(); }
+  bool isUImm3() const { return IsUImm<3>(); }
+  bool isUImm5() const { return IsUImm<5>(); }
+  bool isUImm7() const { return IsUImm<7>(); }
 
   bool isRnumArg() const {
     int64_t Imm;


        


More information about the llvm-commits mailing list