[llvm] r221759 - Remove unused method. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Tue Nov 11 18:35:31 PST 2014
Author: rafael
Date: Tue Nov 11 20:35:31 2014
New Revision: 221759
URL: http://llvm.org/viewvc/llvm-project?rev=221759&view=rev
Log:
Remove unused method. NFC.
Modified:
llvm/trunk/include/llvm/Support/MemoryObject.h
llvm/trunk/include/llvm/Support/StreamableMemoryObject.h
llvm/trunk/lib/Support/StreamableMemoryObject.cpp
Modified: llvm/trunk/include/llvm/Support/MemoryObject.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/MemoryObject.h?rev=221759&r1=221758&r2=221759&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/MemoryObject.h (original)
+++ llvm/trunk/include/llvm/Support/MemoryObject.h Tue Nov 11 20:35:31 2014
@@ -31,14 +31,6 @@ public:
/// @result - The size of the region.
virtual uint64_t getExtent() const = 0;
- /// readByte - Tries to read a single byte from the region.
- ///
- /// @param address - The address of the byte, in the same space as getBase().
- /// @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;
-
/// readBytes - Tries to read a contiguous range of bytes from the
/// region, up to the end of the region.
/// You should override this function if there is a quicker
Modified: llvm/trunk/include/llvm/Support/StreamableMemoryObject.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/StreamableMemoryObject.h?rev=221759&r1=221758&r2=221759&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/StreamableMemoryObject.h (original)
+++ llvm/trunk/include/llvm/Support/StreamableMemoryObject.h Tue Nov 11 20:35:31 2014
@@ -69,7 +69,6 @@ class StreamingMemoryObject : public Str
public:
StreamingMemoryObject(DataStreamer *streamer);
uint64_t getExtent() const override;
- int readByte(uint64_t address, uint8_t *ptr) const override;
int readBytes(uint64_t address, uint64_t size,
uint8_t *buf) const override;
const uint8_t *getPointer(uint64_t address, uint64_t size) const override {
Modified: llvm/trunk/lib/Support/StreamableMemoryObject.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/StreamableMemoryObject.cpp?rev=221759&r1=221758&r2=221759&view=diff
==============================================================================
--- llvm/trunk/lib/Support/StreamableMemoryObject.cpp (original)
+++ llvm/trunk/lib/Support/StreamableMemoryObject.cpp Tue Nov 11 20:35:31 2014
@@ -28,7 +28,6 @@ public:
uint64_t getExtent() const override {
return LastChar - FirstChar;
}
- int readByte(uint64_t address, uint8_t* ptr) const override;
int readBytes(uint64_t address, uint64_t size,
uint8_t *buf) const override;
const uint8_t *getPointer(uint64_t address, uint64_t size) const override;
@@ -56,12 +55,6 @@ private:
void operator=(const RawMemoryObject&) LLVM_DELETED_FUNCTION;
};
-int RawMemoryObject::readByte(uint64_t address, uint8_t* ptr) const {
- if (!validAddress(address)) return -1;
- *ptr = *((uint8_t *)(uintptr_t)(address + FirstChar));
- return 0;
-}
-
int RawMemoryObject::readBytes(uint64_t address,
uint64_t size,
uint8_t *buf) const {
@@ -98,12 +91,6 @@ uint64_t StreamingMemoryObject::getExten
return ObjectSize;
}
-int StreamingMemoryObject::readByte(uint64_t address, uint8_t* ptr) const {
- if (!fetchToPos(address)) return -1;
- *ptr = Bytes[address + BytesSkipped];
- return 0;
-}
-
int StreamingMemoryObject::readBytes(uint64_t address,
uint64_t size,
uint8_t *buf) const {
More information about the llvm-commits
mailing list