[PATCH] Make sure BitcodeWriter works with Unicode characters
David Blaikie
dblaikie at gmail.com
Mon Nov 17 11:28:17 PST 2014
On Sat, Nov 15, 2014 at 2:53 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:
>
> > On 2014 Nov 14, at 11:45, David Blaikie <dblaikie at gmail.com> wrote:
> >
> >>> ! In D6184#6, @loladiro wrote:
> >> As far as I understand, the bitcode supports arbitrarily sized fields
> defined at runtime, so everything goes through uint64_t.
> >
> > Seems a bit strange but certainly getting out of my depth - thanks for
> the explanation :)
>
> FYI, I recently found the LLVM Bit Code Format document [1], which
> explains the format itself. If you look at the code, you'll see that
> MDString (relevant for this case) has an abbreviation that specifies the
> elements of its records as 8-bit fixed width [2].
>
> [1]: http://llvm.org/docs/BitCodeFormat.html
> [2]: http://llvm.org/docs/BitCodeFormat.html#fixed-width-value
Thanks for the links!
> Nevertheless, the `Record` API uses `uint64_t` regardless of how the
> field will be serialized.
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.
- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141117/e2e4ae4d/attachment.html>
More information about the llvm-commits
mailing list