[PATCH] Refactor bitcode reader to simplify control.
Rafael Ávila de Espíndola
rafael.espindola at gmail.com
Wed Apr 8 17:27:32 PDT 2015
================
Comment at: include/llvm/Support/StreamingMemoryObject.h:75
@@ +74,3 @@
+ size_t NextChunkSize = kChunkSize;
+ if (ObjectSize && ObjectSize < BytesRead + kChunkSize) {
+ NextChunkSize = ObjectSize - BytesRead;
----------------
Why do you need this? The streamer will return how many bytes were read and can handle a larger request.
Also, why does it need to be part of this patch? It looks like this patch has many independent changes in it.
================
Comment at: include/llvm/Support/StreamingMemoryObject.h:88
@@ -79,3 +87,3 @@
}
- return Pos < BytesRead;
+ return (Pos < BytesRead) || (ObjectSize && Pos < ObjectSize);
}
----------------
Why the extra logic? If objectsize is known it is the same as BytesRead, no?
http://reviews.llvm.org/D8786
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list