summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-11-12 17:11:16 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-11-12 17:11:16 +0000
commit2d05db49bba6aee4a6acfbcb7b0629edc7f92d13 (patch)
tree0565bea65ca2847cace2bc0d73a3d7283f4e7170 /llvm/lib/Bitcode/Reader
parent21c5353f5416b45a57f4baf2af4e4592caa3df67 (diff)
downloadbcm5719-llvm-2d05db49bba6aee4a6acfbcb7b0629edc7f92d13.tar.gz
bcm5719-llvm-2d05db49bba6aee4a6acfbcb7b0629edc7f92d13.zip
Return the number of read bytes in MemoryObject::readBytes.
Returning more information will allow BitstreamReader to be simplified a bit and changed to read 64 bits at a time. llvm-svn: 221794
Diffstat (limited to 'llvm/lib/Bitcode/Reader')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 713b6a3a4e5..b2ca22c74ba 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -3430,7 +3430,7 @@ std::error_code BitcodeReader::InitLazyStream() {
Stream.init(&*StreamFile);
unsigned char buf[16];
- if (Bytes->readBytes(0, 16, buf) == -1)
+ if (Bytes->readBytes(buf, 16, 0) != 16)
return Error(BitcodeError::InvalidBitcodeSignature);
if (!isBitcode(buf, buf + 16))
OpenPOWER on IntegriCloud