[llvm] [BinaryFormat] Add "SFrame" structures and constants (PR #147264)

Pavel Labath via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 8 03:30:08 PDT 2025


labath wrote:

> > I go back and forth on this, having written a bunch of code with these definitions. On the one hand, it is nice when evaluating against the spec. On the other, it sticks out like a sore thumb once you get past the lowest-level.
> > I'm somewhat inclined to change it all over to llvm style, with a comment on the structures definitions giving the corresponding specification name. It does make grepping a bit harder, but probably worth it.
> > Don't know if anyone else has an opinion.
> 
> Not a strong opinion, but we ended up matching the spec for DAP and I regret it because now nothing looks consistent. Mild +1 on changing it to match the LLVM coding style.

It looks like there is enough votes to go in that direction. Please take a look at the new version (you can select the second commit to view the diff between the two). I've removed `sframe_` from all the structure definition as we're in the `sframe` namespace, and I've changed all enums into scoped. I think this worked quite well except for `enum FREOffset`, where `FREOffset::1B` is not a valid identifier, so I changed it into `B1`.

I haven't done anything with the endianness, as I am waiting for the result of the discussion.

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


More information about the llvm-commits mailing list