summaryrefslogtreecommitdiff
path: root/include/llvm/Support/MemoryObject.h
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-05-24 10:54:58 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-05-24 10:54:58 +0000
commit49a6a8d8f2994249c81b7914b07015714748a55c (patch)
treec14f72e8279f110e51baad10fbe21e62776a5e47 /include/llvm/Support/MemoryObject.h
parent35b2a7a54588e17e4de655bfb29c57d072f19904 (diff)
downloadllvm-49a6a8d8f2994249c81b7914b07015714748a55c.tar.gz
llvm-49a6a8d8f2994249c81b7914b07015714748a55c.tar.bz2
llvm-49a6a8d8f2994249c81b7914b07015714748a55c.tar.xz
Remove the Copied parameter from MemoryObject::readBytes.
There was exactly one caller using this API right, the others were relying on specific behavior of the default implementation. Since it's too hard to use it right just remove it and standardize on the default behavior. Defines away PR16132. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/MemoryObject.h')
-rw-r--r--include/llvm/Support/MemoryObject.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/include/llvm/Support/MemoryObject.h b/include/llvm/Support/MemoryObject.h
index 732b0f0774..17aa9d2f67 100644
--- a/include/llvm/Support/MemoryObject.h
+++ b/include/llvm/Support/MemoryObject.h
@@ -42,7 +42,7 @@ public:
/// @param ptr - A pointer to a byte to be filled in. Must be non-NULL.
/// @result - 0 if successful; -1 if not. Failure may be due to a
/// bounds violation or an implementation-specific error.
- virtual int readByte(uint64_t address, uint8_t* ptr) const = 0;
+ virtual int readByte(uint64_t address, uint8_t *ptr) const = 0;
/// readBytes - Tries to read a contiguous range of bytes from the
/// region, up to the end of the region.
@@ -51,17 +51,12 @@ public:
///
/// @param address - The address of the first byte, in the same space as
/// getBase().
- /// @param size - The maximum number of bytes to copy.
+ /// @param size - The number of bytes to copy.
/// @param buf - A pointer to a buffer to be filled in. Must be non-NULL
/// and large enough to hold size bytes.
- /// @param copied - A pointer to a nunber that is filled in with the number
- /// of bytes actually read. May be NULL.
/// @result - 0 if successful; -1 if not. Failure may be due to a
/// bounds violation or an implementation-specific error.
- virtual int readBytes(uint64_t address,
- uint64_t size,
- uint8_t* buf,
- uint64_t* copied) const;
+ virtual int readBytes(uint64_t address, uint64_t size, uint8_t *buf) const;
};
}