Remove unused method. NFC.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 12 Nov 2014 02:35:31 +0000 (02:35 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 12 Nov 2014 02:35:31 +0000 (02:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221759 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/MemoryObject.h
include/llvm/Support/StreamableMemoryObject.h
lib/Support/StreamableMemoryObject.cpp

index dc5106e1c5db01dcabfb7fd1d082735b9c926d55..dfc8073bccd2c8c679428a03d513f37b5a61b95d 100644 (file)
@@ -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
index 8094b53cc713a1a6a3c32b36fce7b5df88666d01..6bb130b876afd413c3cf1c1d2704f2b708320983 100644 (file)
@@ -69,7 +69,6 @@ class StreamingMemoryObject : public StreamableMemoryObject {
 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 {
index 7909c8e678c3998f93014dfacd9a865026bce6b8..1a11f5b0cde9c5fca3925ec81de256147810f5ef 100644 (file)
@@ -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::getExtent() const {
   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 {