<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 15, 2014 at 2:53 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 2014 Nov 14, at 11:45, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
><br>
>>> ! In D6184#6, @loladiro wrote:<br>
>> As far as I understand, the bitcode supports arbitrarily sized fields defined at runtime, so everything goes through uint64_t.<br>
><br>
> Seems a bit strange but certainly getting out of my depth - thanks for the explanation :)<br>
<br>
</span>FYI, I recently found the LLVM Bit Code Format document [1], which<br>
explains the format itself. If you look at the code, you'll see that<br>
MDString (relevant for this case) has an abbreviation that specifies the<br>
elements of its records as 8-bit fixed width [2].<br>
<br>
[1]: <a href="http://llvm.org/docs/BitCodeFormat.html" target="_blank">http://llvm.org/docs/BitCodeFormat.html</a><br>
[2]: <a href="http://llvm.org/docs/BitCodeFormat.html#fixed-width-value" target="_blank">http://llvm.org/docs/BitCodeFormat.html#fixed-width-value</a></blockquote><div><br>Thanks for the links!<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nevertheless, the `Record` API uses `uint64_t` regardless of how the<br>
field will be serialized.</blockquote><div><br>Actually it's templated so you can use vectors of different (unsigned integer) widths, but since these records have some fields that are greater than a byte, it doesn't look like we can use a vector of uint8_t without truncating those other fields in the same record.<br><br>- David<br> </div></div><br></div></div>