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

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 8 13:15:27 PDT 2024


deadalnix wrote:

To add a bit more to this, in cases where the def file is used, you usually expose a C enum with all the values anyways, and use the def file to autogenerate a switch on the C++ side mapping from the C enum values to the values used internally by LLVM.

For instance: https://github.com/llvm/llvm-project/blob/7a7d370742dff82caa6a713bc2b1e2c0c51a9f30/llvm/lib/IR/DebugInfo.cpp#L1008-L1017

But I do not think this is really necessary here as the value are defined in the DWARF standard and are going to be stable as a result.

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


More information about the llvm-commits mailing list