[LLVMdev] [RFC] Moving OnDiskHashTable from clang to LLVM (original) (raw)

Justin Bogner mail at justinbogner.com
Mon Mar 24 14:31:41 PDT 2014


Rafael EspĂ­ndola <rafael.espindola at gmail.com> writes:

I think I see your point. The API seem sufficiently different that there might be use cases where one or the other is better. Using an explicit increment would make the code less readable. The API in Endian.h is nice for cases where we know the entire layout of large data section, since they are composable:

struct dosheader { support::ulittle16t Magic; support::ulittle16t UsedBytesInTheLastPage; ... }; If the use cases we have in clang or the ones you want to add don't match this, then regular stream api is probably better. I would keep it out of rawostream, at least for now. How a about a include/llvm/Support/EndianStream.h?

I've sent two patches to the list, one which introduces a stream writer in EndianStream.h, and one that adds a readNext function to Endian.h:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140324/210057.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140324/210061.html

How do these sound?



More information about the llvm-dev mailing list