summaryrefslogtreecommitdiff
path: root/include/llvm/Support/BinaryItemStream.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/BinaryItemStream.h')
-rw-r--r--include/llvm/Support/BinaryItemStream.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Support/BinaryItemStream.h b/include/llvm/Support/BinaryItemStream.h
index fe7e6caeaafb7..278723ddf8daf 100644
--- a/include/llvm/Support/BinaryItemStream.h
+++ b/include/llvm/Support/BinaryItemStream.h
@@ -45,7 +45,7 @@ public:
if (!ExpectedIndex)
return ExpectedIndex.takeError();
const auto &Item = Items[*ExpectedIndex];
- if (auto EC = checkOffset(Offset, Size))
+ if (auto EC = checkOffsetForRead(Offset, Size))
return EC;
if (Size > Traits::length(Item))
return make_error<BinaryStreamError>(stream_error_code::stream_too_short);