mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 03:23:01 +02:00
Wow, for some reason, when reading bytecode from stdin, we were only reading
4 bytes at a time. Change this to read blocks of 4k llvm-svn: 4265
This commit is contained in:
parent
295493e86e
commit
a2c2d8af59
@ -624,7 +624,7 @@ Module *ParseBytecodeFile(const std::string &Filename, std::string *ErrorStr) {
|
||||
size_t FileSize = 0;
|
||||
int BlockSize;
|
||||
uchar Buffer[4096], *FileData = 0;
|
||||
while ((BlockSize = read(0, Buffer, 4))) {
|
||||
while ((BlockSize = read(0, Buffer, 4096))) {
|
||||
if (BlockSize == -1) { free(FileData); return 0; }
|
||||
|
||||
FileData = (uchar*)realloc(FileData, FileSize+BlockSize);
|
||||
|
Loading…
Reference in New Issue
Block a user