[llvm] r221537 - Don't redeclare a pure virtual method.

Rafael Espindola rafael.espindola at gmail.com
Fri Nov 7 10:07:04 PST 2014


Author: rafael
Date: Fri Nov  7 12:07:04 2014
New Revision: 221537

URL: http://llvm.org/viewvc/llvm-project?rev=221537&view=rev
Log:
Don't redeclare a pure virtual method.

I.E., there is no value is having

void foo() override = 0;

If it is override it is already present in a base class. Since it is pure,
some other class will have to implement it.

Modified:
    llvm/trunk/include/llvm/IR/InstrTypes.h
    llvm/trunk/include/llvm/Support/StreamableMemoryObject.h

Modified: llvm/trunk/include/llvm/IR/InstrTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/InstrTypes.h?rev=221537&r1=221536&r2=221537&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/InstrTypes.h (original)
+++ llvm/trunk/include/llvm/IR/InstrTypes.h Fri Nov  7 12:07:04 2014
@@ -51,7 +51,6 @@ protected:
   virtual BasicBlock *getSuccessorV(unsigned idx) const = 0;
   virtual unsigned getNumSuccessorsV() const = 0;
   virtual void setSuccessorV(unsigned idx, BasicBlock *B) = 0;
-  TerminatorInst *clone_impl() const override = 0;
 public:
 
   /// Return the number of successors that this terminator has.

Modified: llvm/trunk/include/llvm/Support/StreamableMemoryObject.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/StreamableMemoryObject.h?rev=221537&r1=221536&r2=221537&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/StreamableMemoryObject.h (original)
+++ llvm/trunk/include/llvm/Support/StreamableMemoryObject.h Fri Nov  7 12:07:04 2014
@@ -37,44 +37,6 @@ class StreamableMemoryObject : public Me
   /// Destructor      - Override as necessary.
   virtual ~StreamableMemoryObject();
 
-  /// getBase         - Returns the lowest valid address in the region.
-  ///
-  /// @result         - The lowest valid address.
-  uint64_t getBase() const override = 0;
-
-  /// getExtent       - Returns the size of the region in bytes.  (The region is
-  ///                   contiguous, so the highest valid address of the region
-  ///                   is getBase() + getExtent() - 1).
-  ///                   May block until all bytes in the stream have been read
-  ///
-  /// @result         - The size of the region.
-  uint64_t getExtent() const override = 0;
-
-  /// readByte        - Tries to read a single byte from the region.
-  ///                   May block until (address - base) bytes have been read
-  /// @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.
-  int readByte(uint64_t address, uint8_t *ptr) const override = 0;
-
-  /// readBytes       - Tries to read a contiguous range of bytes from the
-  ///                   region, up to the end of the region.
-  ///                   May block until (address - base + size) bytes have
-  ///                   been read. Additionally, StreamableMemoryObjects will
-  ///                   not do partial reads - if size bytes cannot be read,
-  ///                   readBytes will fail.
-  ///
-  /// @param address  - The address of the first byte, in the same space as
-  ///                   getBase().
-  /// @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.
-  /// @result         - 0 if successful; -1 if not.  Failure may be due to a
-  ///                   bounds violation or an implementation-specific error.
-  int readBytes(uint64_t address, uint64_t size,
-                uint8_t *buf) const override = 0;
-
   /// getPointer  - Ensures that the requested data is in memory, and returns
   ///               A pointer to it. More efficient than using readBytes if the
   ///               data is already in memory.





More information about the llvm-commits mailing list