[llvm] [C API] Add bindings for DWARF type encoding. (PR #102171)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 04:54:38 PDT 2024


deadalnix wrote:

@jryans See the ocaml binding in tree for instance. Typically, no tool is run at all. Header (or any equivalent, that would be module interface in OCaml) are simply being translated, manually or assisted by tools.

Automated translation are usually a challenge, because language semantic do not match 1:1, so executive decisions have to be made. For instance, some enum represent an exhaustive list of allowable values (for instance `LLVMOpcode`), while others are giving name to usual value to make the code more readable (for instance `LLVMAttributeIndex`) while other represent flags that can be combined (for instance `LLVMFastMathFlags`). All of the above are C enums, but they need to be translated differently depending on the target language. A tool is typically unable to know which is which.

@dwblaikie I get that, but honestly, as a user, I'll take having an outdated set of value in there over having to deal with the def file.

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


More information about the llvm-commits mailing list