summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/StreamingMemoryObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/StreamingMemoryObject.cpp')
-rw-r--r--llvm/lib/Support/StreamingMemoryObject.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Support/StreamingMemoryObject.cpp b/llvm/lib/Support/StreamingMemoryObject.cpp
index 5a44e624eb8..fb566179486 100644
--- a/llvm/lib/Support/StreamingMemoryObject.cpp
+++ b/llvm/lib/Support/StreamingMemoryObject.cpp
@@ -104,6 +104,12 @@ uint64_t StreamingMemoryObject::readBytes(uint8_t *Buf, uint64_t Size,
return Size;
}
+const uint8_t *StreamingMemoryObject::getPointer(uint64_t Address,
+ uint64_t Size) const {
+ fetchToPos(Address + Size - 1);
+ return &Bytes[Address + BytesSkipped];
+}
+
bool StreamingMemoryObject::dropLeadingBytes(size_t s) {
if (BytesRead < s) return true;
BytesSkipped = s;
OpenPOWER on IntegriCloud