[llvm] [Object] Parsing and dumping of SFrame Frame Row Entries (PR #151301)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 5 01:47:07 PDT 2025


================
@@ -68,3 +68,11 @@ ArrayRef<EnumEntry<sframe::FREOffset>> sframe::getFREOffsets() {
   };
   return ArrayRef(FREOffsets);
 }
+
+ArrayRef<EnumEntry<sframe::BaseReg>> sframe::getBaseRegisters() {
+  static constexpr EnumEntry<sframe::BaseReg> BaseRegs[] = {
+      {"FP", sframe::BaseReg::FP},
+      {"SP", sframe::BaseReg::SP},
+  };
+  return ArrayRef(BaseRegs);
+}
----------------
jh7370 wrote:

I'm probably missing something, but why not just have the static local exposed as a constant without the function wrapper?

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


More information about the llvm-commits mailing list