[PATCH] Make sure BitcodeWriter works with Unicode characters

Duncan P. N. Exon Smith dexonsmith at apple.com
Sat Nov 15 14:53:53 PST 2014


> 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

Nevertheless, the `Record` API uses `uint64_t` regardless of how the
field will be serialized.



More information about the llvm-commits mailing list