[LLVMdev] [RFC] Moving OnDiskHashTable from clang to LLVM (original) (raw)
Michael Spencer bigcheesegs at gmail.com
Sun Mar 23 03:00:20 PDT 2014
- Previous message: [LLVMdev] [RFC] Moving OnDiskHashTable from clang to LLVM
- Next message: [LLVMdev] [RFC] Moving OnDiskHashTable from clang to LLVM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, Mar 22, 2014 at 8:45 PM, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
They're obviously related. Endian.h defines types like ulittle32, which DTRT when read and written from memory, whereas clang::io has functions to read and write memory like so:
void Emit32(rawostream& Out, uint32t V); uint32t ReadLE32(const unsigned char *&Data); uint32t ReadUnalignedLE32(const unsigned char *&Data); The (aligned) ReadLE32 is easily represented by the stuff in Endian.h, but the write to an ostream and reading unaligned aren't addressed very well at present. ulittle32 is actually unaligned: typedef detail::packedendianspecificintegral <uint32t, little, unaligned> ulittle32t But yes, I don't think we have anything for writing and I it is probably not trivial to extend it. We can probably add the existing write functions to Endian.h itself. What is lld using? If we are moving these functions from clang to llvm it would be really nice to use them in lld too. We could still add this stuff to Endian.h, assuming it isn't an issue to depend on rawostream.h from Endian.h. I'm not sure if that'd be a problem or not. Cheers, Rafael
packed_endian_specific_integral supports writing.
- Michael Spencer
- Previous message: [LLVMdev] [RFC] Moving OnDiskHashTable from clang to LLVM
- Next message: [LLVMdev] [RFC] Moving OnDiskHashTable from clang to LLVM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]