[llvm] [llvm-exegesis] Begin replacing unsigned with MCRegister. NFC (PR #123109)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 12:05:09 PST 2025


================
@@ -65,17 +65,17 @@ struct YamlContext {
 
   raw_string_ostream &getErrorStream() { return ErrorStream; }
 
-  StringRef getRegName(unsigned RegNo) {
+  StringRef getRegName(MCRegister Reg) {
     // Special case: RegNo 0 is NoRegister. We have to deal with it explicitly.
-    if (RegNo == 0)
+    if (!Reg)
----------------
mshockwave wrote:

`!Reg.isValid()`? Personally I feel like the intention would be more clear if we spell this out.

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


More information about the llvm-commits mailing list