summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/BinaryStreamReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/BinaryStreamReader.cpp')
-rw-r--r--llvm/lib/Support/BinaryStreamReader.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Support/BinaryStreamReader.cpp b/llvm/lib/Support/BinaryStreamReader.cpp
index bfb658cfa0b..e00527f2519 100644
--- a/llvm/lib/Support/BinaryStreamReader.cpp
+++ b/llvm/lib/Support/BinaryStreamReader.cpp
@@ -109,6 +109,12 @@ Error BinaryStreamReader::readStreamRef(BinaryStreamRef &Ref, uint32_t Length) {
return Error::success();
}
+Error BinaryStreamReader::readSubstream(BinarySubstreamRef &Stream,
+ uint32_t Size) {
+ Stream.Offset = getOffset();
+ return readStreamRef(Stream.StreamData, Size);
+}
+
Error BinaryStreamReader::skip(uint32_t Amount) {
if (Amount > bytesRemaining())
return make_error<BinaryStreamError>(stream_error_code::stream_too_short);
OpenPOWER on IntegriCloud