Page MenuHomePhabricator

[LLVM-C] Add bindings to create macro debug info
Needs ReviewPublic

Authored by Jiboo on Feb 17 2019, 3:43 PM.



The C API doesn't have the bindings to create macro debug information.

Diff Detail

Event Timeline

Jiboo created this revision.Feb 17 2019, 3:43 PM
whitequark added inline comments.Feb 17 2019, 3:45 PM

Where are these definitions from?

CodaFi added inline comments.Feb 17 2019, 8:47 PM

MacinfoRecordType. I think having a parallel for that type in the C API needs to come along with this patch.

Jiboo updated this revision to Diff 187216.Feb 18 2019, 3:44 AM

Mybad, llvm::dwarf::MacinfoRecordType (in llvm/BinaryFormat/Dwarf.h) isn't generated using Dwarf.def, so I just used the same values for another enum in llvm-c/DebugInfo.h.
The values in llvm::dwarf::MacinfoRecordType won't move as they are defined by the DWARFv4 standard (Figure 39. Macinfo Type Encodings, at page 194/325), so it is safe to static_cast it from the new LLVMDWARFMacinfoRecordType to MacinfoRecordType.

Do we usually add unit tests for the LLVM C API? If so that would be good here, too.