diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-09-23 02:12:10 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-09-23 02:12:10 +0000 |
commit | a96a1824747632ce87ef065b4a13fb777d2b14d6 (patch) | |
tree | 7a4851895fbb852ec33c6b8ece55584e9ad03014 /lib | |
parent | 4d6b84028ab3b135308296d61a8acfc3fd0b1fb1 (diff) |
Add LLVM_OVERRIDE to methods that override their base classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Support/DAGDeltaAlgorithm.cpp | 4 | ||||
-rw-r--r-- | lib/Support/DataStream.cpp | 2 | ||||
-rw-r--r-- | lib/Support/MemoryBuffer.cpp | 10 | ||||
-rw-r--r-- | lib/Support/StreamableMemoryObject.cpp | 19 | ||||
-rw-r--r-- | lib/Support/system_error.cpp | 10 | ||||
-rw-r--r-- | lib/VMCore/Instructions.cpp | 2 |
6 files changed, 26 insertions, 21 deletions
diff --git a/lib/Support/DAGDeltaAlgorithm.cpp b/lib/Support/DAGDeltaAlgorithm.cpp index a616045b6b..34e82cf441 100644 --- a/lib/Support/DAGDeltaAlgorithm.cpp +++ b/lib/Support/DAGDeltaAlgorithm.cpp @@ -163,11 +163,11 @@ class DeltaActiveSetHelper : public DeltaAlgorithm { protected: /// UpdatedSearchState - Callback used when the search state changes. virtual void UpdatedSearchState(const changeset_ty &Changes, - const changesetlist_ty &Sets) { + const changesetlist_ty &Sets) LLVM_OVERRIDE { DDAI.UpdatedSearchState(Changes, Sets, Required); } - virtual bool ExecuteOneTest(const changeset_ty &S) { + virtual bool ExecuteOneTest(const changeset_ty &S) LLVM_OVERRIDE { return DDAI.GetTestResult(S, Required); } diff --git a/lib/Support/DataStream.cpp b/lib/Support/DataStream.cpp index 94d14a5e36..3a38e2a66b 100644 --- a/lib/Support/DataStream.cpp +++ b/lib/Support/DataStream.cpp @@ -58,7 +58,7 @@ public: virtual ~DataFileStreamer() { close(Fd); } - virtual size_t GetBytes(unsigned char *buf, size_t len) { + virtual size_t GetBytes(unsigned char *buf, size_t len) LLVM_OVERRIDE { NumStreamFetches++; return read(Fd, buf, len); } diff --git a/lib/Support/MemoryBuffer.cpp b/lib/Support/MemoryBuffer.cpp index 992f03c520..e7080701eb 100644 --- a/lib/Support/MemoryBuffer.cpp +++ b/lib/Support/MemoryBuffer.cpp @@ -81,12 +81,12 @@ public: init(InputData.begin(), InputData.end(), RequiresNullTerminator); } - virtual const char *getBufferIdentifier() const { + virtual const char *getBufferIdentifier() const LLVM_OVERRIDE { // The name is stored after the class itself. return reinterpret_cast<const char*>(this + 1); } - - virtual BufferKind getBufferKind() const { + + virtual BufferKind getBufferKind() const LLVM_OVERRIDE { return MemoryBuffer_Malloc; } }; @@ -194,8 +194,8 @@ public: sys::Path::UnMapFilePages(reinterpret_cast<const char*>(RealStart), RealSize); } - - virtual BufferKind getBufferKind() const { + + virtual BufferKind getBufferKind() const LLVM_OVERRIDE { return MemoryBuffer_MMap; } }; diff --git a/lib/Support/StreamableMemoryObject.cpp b/lib/Support/StreamableMemoryObject.cpp index 6fec9a9589..59e27a263e 100644 --- a/lib/Support/StreamableMemoryObject.cpp +++ b/lib/Support/StreamableMemoryObject.cpp @@ -24,18 +24,23 @@ public: assert(LastChar >= FirstChar && "Invalid start/end range"); } - virtual uint64_t getBase() const { return 0; } - virtual uint64_t getExtent() const { return LastChar - FirstChar; } - virtual int readByte(uint64_t address, uint8_t* ptr) const; + virtual uint64_t getBase() const LLVM_OVERRIDE { return 0; } + virtual uint64_t getExtent() const LLVM_OVERRIDE { + return LastChar - FirstChar; + } + 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; - virtual const uint8_t *getPointer(uint64_t address, uint64_t size) const; - virtual bool isValidAddress(uint64_t address) const { + uint64_t* copied) 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 { return validAddress(address); } - virtual bool isObjectEnd(uint64_t address) const {return objectEnd(address);} + virtual bool isObjectEnd(uint64_t address) const LLVM_OVERRIDE { + return objectEnd(address); + } private: const uint8_t* const FirstChar; diff --git a/lib/Support/system_error.cpp b/lib/Support/system_error.cpp index 56898de315..2df223ca71 100644 --- a/lib/Support/system_error.cpp +++ b/lib/Support/system_error.cpp @@ -48,8 +48,8 @@ _do_message::message(int ev) const { class _generic_error_category : public _do_message { public: - virtual const char* name() const; - virtual std::string message(int ev) const; + virtual const char* name() const LLVM_OVERRIDE; + virtual std::string message(int ev) const LLVM_OVERRIDE; }; const char* @@ -74,9 +74,9 @@ generic_category() { class _system_error_category : public _do_message { public: - virtual const char* name() const; - virtual std::string message(int ev) const; - virtual error_condition default_error_condition(int ev) const; + virtual const char* name() const LLVM_OVERRIDE; + virtual std::string message(int ev) const LLVM_OVERRIDE; + virtual error_condition default_error_condition(int ev) const LLVM_OVERRIDE; }; const char* diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 9af98e8a9b..d5b756dac0 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -2836,7 +2836,7 @@ BitCastInst::BitCastInst( // CmpInst Classes //===----------------------------------------------------------------------===// -void CmpInst::Anchor() const {} +void CmpInst::anchor() {} CmpInst::CmpInst(Type *ty, OtherOps op, unsigned short predicate, Value *LHS, Value *RHS, const Twine &Name, |