<div dir="ltr"><div><div><div><div>In the Zig frontend, users can set the types of enums like this:<br><br></div>const Foo = enum (u64) {<br></div>    A = 18446744073709551615,<br></div>    B = 1,<br></div>    C = 2,<br><div><div><div>};</div><div><br></div><div>I cannot use the DebugInfo API <br></div><div>DIEnumerator *createEnumerator(StringRef Name, int64_t Val);<br></div><div>because 18446744073709551615 is outside the range of int64_t.</div><div><br></div><div>Even if this accepted an unsigned int, Zig frontend can do this:</div><div><br></div><div>const Bar = enum(u128) {</div><div>    A = 340282366920938463463374607431768211455,<br>    B = 1,<br>    C = 2,</div><div>};</div><div><br></div><div>Now we're *really* out of luck.</div><div><br></div><div>I read the Dwarf 4 spec, and it supports arbitrary integer values for enumerator constants.</div><div><br></div><div>Can we add an overload to createEnumerator to accept an APInt?</div><div><br></div><div>Regards,</div><div>Andrew<br></div></div></div></div>