[llvm] [InlineAsm] wrap ConstraintCode in enum class NFC (PR #66003)

Nick Desaulniers via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 11:34:02 PDT 2023


================
@@ -17395,13 +17395,13 @@ RISCVTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
   return Res;
 }
 
-unsigned
+InlineAsm::ConstraintCode
 RISCVTargetLowering::getInlineAsmMemConstraint(StringRef ConstraintCode) const {
   // Currently only support length 1 constraints.
   if (ConstraintCode.size() == 1) {
     switch (ConstraintCode[0]) {
     case 'A':
-      return InlineAsm::Constraint_A;
+      return InlineAsm::ConstraintCode::A;
----------------
nickdesaulniers wrote:

@RKSimon well, this change is refactoring targets in an NFC commit.  I assume you meant "please don't change this switch to an if-else chain" rather than "I reject this PR outright?"

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


More information about the llvm-commits mailing list