aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-22 23:55:24 +0000
committerChris Lattner <sabre@nondot.org>2002-10-22 23:55:24 +0000
commit5dfab9ec22bcae02a7120823cac085d02661c55f (patch)
tree4d8aca220fa89c77d48aedbd66de27474db8b6d9 /lib/Bytecode
parentf924b2de08d21a6354ef3c91f56bcb5f69ba2051 (diff)
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
Diffstat (limited to 'lib/Bytecode')
-rw-r--r--lib/Bytecode/Reader/Reader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index 9aa5455211..23af02e516 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);