Page MenuHomePhabricator

Change DIEnumerator payload type to APInt

Authored by LemonBoy on May 27 2019, 2:12 AM.



As briefly discussed on the ML this patch aims to remove any limitation on the enumerator values.

A few notes:

  • In LLParser::ParseDIEnumerator there's a mild hack: the reader returns a "tight" integer (eg 0x7FFFFFFF uses 31 bits) and that makes it sign-extend to -1. The solution is to add a leading zero to avoid any ambiguity.
  • The value encoding is the same one used for integer constants using > 64 bit, I've recycled the old slot used for the value to hold the bit width and the whole APInt payload is dumped after the name slot.
  • The DWARF code emits a DATA references for big constants and (I guess due to point 1) I had to slightly change a single test case.

Diff Detail

Event Timeline

LemonBoy created this revision.May 27 2019, 2:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2019, 2:12 AM
LemonBoy updated this revision to Diff 201516.May 27 2019, 5:48 AM

Oops, I had attached the wrong .patch file.

andrewrk accepted this revision.May 27 2019, 7:50 AM
andrewrk added a subscriber: andrewrk.


This revision is now accepted and ready to land.May 27 2019, 7:50 AM
ormris removed a subscriber: ormris.May 28 2019, 9:21 AM