From 5dfab9ec22bcae02a7120823cac085d02661c55f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 22 Oct 2002 23:55:24 +0000 Subject: [PATCH] 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4265 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bytecode/Reader/Reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp index 9aa54552110..23af02e516b 100644 --- a/lib/Bytecode/Reader/Reader.cpp +++ b/lib/Bytecode/Reader/Reader.cpp @@ -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);