summaryrefslogtreecommitdiffstats
path: root/lib/Support/StreamableMemoryObject.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:04:03 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:04:03 +0000
commit8cf58e3ee36bd550746fca361a894e2727485200 (patch)
tree2ba0398b4c42ad4f55561327538044fd2c925a8b /lib/Support/StreamableMemoryObject.cpp
parentaa45f148926e3461a1fd8b10c990f0a51a908cc9 (diff)
downloadFreeBSD-src-8cf58e3ee36bd550746fca361a894e2727485200.zip
FreeBSD-src-8cf58e3ee36bd550746fca361a894e2727485200.tar.gz
Vendor import of llvm release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/llvm/branches/release_34@197841
Diffstat (limited to 'lib/Support/StreamableMemoryObject.cpp')
-rw-r--r--lib/Support/StreamableMemoryObject.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/Support/StreamableMemoryObject.cpp b/lib/Support/StreamableMemoryObject.cpp
index 59e27a2..2ed7c5c 100644
--- a/lib/Support/StreamableMemoryObject.cpp
+++ b/lib/Support/StreamableMemoryObject.cpp
@@ -31,8 +31,7 @@ public:
virtual int readByte(uint64_t address, uint8_t* ptr) const LLVM_OVERRIDE;
virtual int readBytes(uint64_t address,
uint64_t size,
- uint8_t* buf,
- uint64_t* copied) const LLVM_OVERRIDE;
+ uint8_t *buf) const LLVM_OVERRIDE;
virtual const uint8_t *getPointer(uint64_t address,
uint64_t size) const LLVM_OVERRIDE;
virtual bool isValidAddress(uint64_t address) const LLVM_OVERRIDE {
@@ -67,11 +66,9 @@ int RawMemoryObject::readByte(uint64_t address, uint8_t* ptr) const {
int RawMemoryObject::readBytes(uint64_t address,
uint64_t size,
- uint8_t* buf,
- uint64_t* copied) const {
+ uint8_t *buf) const {
if (!validAddress(address) || !validAddress(address + size - 1)) return -1;
memcpy(buf, (uint8_t *)(uintptr_t)(address + FirstChar), size);
- if (copied) *copied = size;
return size;
}
@@ -111,11 +108,9 @@ int StreamingMemoryObject::readByte(uint64_t address, uint8_t* ptr) const {
int StreamingMemoryObject::readBytes(uint64_t address,
uint64_t size,
- uint8_t* buf,
- uint64_t* copied) const {
+ uint8_t *buf) const {
if (!fetchToPos(address + size - 1)) return -1;
memcpy(buf, &Bytes[address + BytesSkipped], size);
- if (copied) *copied = size;
return 0;
}
OpenPOWER on IntegriCloud