[PATCH] D16277: Bitcode: use blob for string storage in the IR: trade a bit of space for faster reading
Filipe Cabecinhas via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 18 08:22:04 PST 2016
filcab added a subscriber: filcab.
================
Comment at: include/llvm/Support/StreamingMemoryObject.h:34
@@ -30,9 +33,3 @@
uint64_t Address) const override;
- const uint8_t *getPointer(uint64_t address, uint64_t size) const override {
- // FIXME: This could be fixed by ensuring the bytes are fetched and
- // making a copy, requiring that the bitcode size be known, or
- // otherwise ensuring that the memory doesn't go away/get reallocated,
- // but it's not currently necessary. Users that need the pointer (any
- // that need Blobs) don't stream.
- report_fatal_error("getPointer in streaming memory objects not allowed");
- return nullptr;
+ const uint8_t *getPointer(uint64_t Address, uint64_t Size) const override {
+ Buffer.resize(Size);
----------------
What happens if there's two BLOBs in the stream? Wouldn't you overwrite one with the other?
http://reviews.llvm.org/D16277
More information about the llvm-commits
mailing list