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 /include/llvm/Support | |
parent | 4d6b84028ab3b135308296d61a8acfc3fd0b1fb1 (diff) | |
download | external_llvm-a96a1824747632ce87ef065b4a13fb777d2b14d6.zip external_llvm-a96a1824747632ce87ef065b4a13fb777d2b14d6.tar.gz external_llvm-a96a1824747632ce87ef065b4a13fb777d2b14d6.tar.bz2 |
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 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/Allocator.h | 4 | ||||
-rw-r--r-- | include/llvm/Support/CommandLine.h | 9 | ||||
-rw-r--r-- | include/llvm/Support/FormattedStream.h | 4 | ||||
-rw-r--r-- | include/llvm/Support/PrettyStackTrace.h | 4 | ||||
-rw-r--r-- | include/llvm/Support/StreamableMemoryObject.h | 15 | ||||
-rw-r--r-- | include/llvm/Support/YAMLParser.h | 6 | ||||
-rw-r--r-- | include/llvm/Support/circular_raw_ostream.h | 4 | ||||
-rw-r--r-- | include/llvm/Support/raw_os_ostream.h | 10 | ||||
-rw-r--r-- | include/llvm/Support/raw_ostream.h | 28 | ||||
-rw-r--r-- | include/llvm/Support/system_error.h | 2 |
10 files changed, 44 insertions, 42 deletions
diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index 6ad5f5c..a644b13 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -79,8 +79,8 @@ class MallocSlabAllocator : public SlabAllocator { public: MallocSlabAllocator() : Allocator() { } virtual ~MallocSlabAllocator(); - virtual MemSlab *Allocate(size_t Size); - virtual void Deallocate(MemSlab *Slab); + virtual MemSlab *Allocate(size_t Size) LLVM_OVERRIDE; + virtual void Deallocate(MemSlab *Slab) LLVM_OVERRIDE; }; /// BumpPtrAllocator - This allocator is useful for containers that need diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index ae1570d..d0c3047 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -1608,15 +1608,16 @@ public: class alias : public Option { Option *AliasFor; virtual bool handleOccurrence(unsigned pos, StringRef /*ArgName*/, - StringRef Arg) { + StringRef Arg) LLVM_OVERRIDE { return AliasFor->handleOccurrence(pos, AliasFor->ArgStr, Arg); } // Handle printing stuff... - virtual size_t getOptionWidth() const; - virtual void printOptionInfo(size_t GlobalWidth) const; + virtual size_t getOptionWidth() const LLVM_OVERRIDE; + virtual void printOptionInfo(size_t GlobalWidth) const LLVM_OVERRIDE; // Aliases do not need to print their values. - virtual void printOptionValue(size_t /*GlobalWidth*/, bool /*Force*/) const {} + virtual void printOptionValue(size_t /*GlobalWidth*/, + bool /*Force*/) const LLVM_OVERRIDE {} void done() { if (!hasArgStr()) diff --git a/include/llvm/Support/FormattedStream.h b/include/llvm/Support/FormattedStream.h index 61a219f..21635dc 100644 --- a/include/llvm/Support/FormattedStream.h +++ b/include/llvm/Support/FormattedStream.h @@ -55,11 +55,11 @@ namespace llvm /// const char *Scanned; - virtual void write_impl(const char *Ptr, size_t Size); + virtual void write_impl(const char *Ptr, size_t Size) LLVM_OVERRIDE; /// current_pos - Return the current position within the stream, /// not counting the bytes currently in the buffer. - virtual uint64_t current_pos() const { + virtual uint64_t current_pos() const LLVM_OVERRIDE { // Our current position in the stream is all the contents which have been // written to the underlying stream (*not* the current position of the // underlying stream). diff --git a/include/llvm/Support/PrettyStackTrace.h b/include/llvm/Support/PrettyStackTrace.h index 060d63e..2122e06 100644 --- a/include/llvm/Support/PrettyStackTrace.h +++ b/include/llvm/Support/PrettyStackTrace.h @@ -54,7 +54,7 @@ namespace llvm { const char *Str; public: PrettyStackTraceString(const char *str) : Str(str) {} - virtual void print(raw_ostream &OS) const; + virtual void print(raw_ostream &OS) const LLVM_OVERRIDE; }; /// PrettyStackTraceProgram - This object prints a specified program arguments @@ -65,7 +65,7 @@ namespace llvm { public: PrettyStackTraceProgram(int argc, const char * const*argv) : ArgC(argc), ArgV(argv) {} - virtual void print(raw_ostream &OS) const; + virtual void print(raw_ostream &OS) const LLVM_OVERRIDE; }; } // end namespace llvm diff --git a/include/llvm/Support/StreamableMemoryObject.h b/include/llvm/Support/StreamableMemoryObject.h index 58db559..a2b4bcb 100644 --- a/include/llvm/Support/StreamableMemoryObject.h +++ b/include/llvm/Support/StreamableMemoryObject.h @@ -108,14 +108,15 @@ class StreamableMemoryObject : public MemoryObject { class StreamingMemoryObject : public StreamableMemoryObject { public: StreamingMemoryObject(DataStreamer *streamer); - virtual uint64_t getBase() const { return 0; } - virtual uint64_t getExtent() const; - 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; + 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 { + uint64_t* copied) const LLVM_OVERRIDE; + virtual const uint8_t *getPointer(uint64_t address, + uint64_t size) const LLVM_OVERRIDE { // This could be fixed by ensuring the bytes are fetched and making a copy, // requiring that the bitcode size be known, or otherwise ensuring that // the memory doesn't go away/get reallocated, but it's @@ -123,8 +124,8 @@ public: assert(0 && "getPointer in streaming memory objects not allowed"); return NULL; } - virtual bool isValidAddress(uint64_t address) const; - virtual bool isObjectEnd(uint64_t address) const; + virtual bool isValidAddress(uint64_t address) const LLVM_OVERRIDE; + virtual bool isObjectEnd(uint64_t address) const LLVM_OVERRIDE; /// Drop s bytes from the front of the stream, pushing the positions of the /// remaining bytes down by s. This is used to skip past the bitcode header, diff --git a/include/llvm/Support/YAMLParser.h b/include/llvm/Support/YAMLParser.h index 98910eb..eacd651 100644 --- a/include/llvm/Support/YAMLParser.h +++ b/include/llvm/Support/YAMLParser.h @@ -241,7 +241,7 @@ public: /// @returns The value, or nullptr if failed() == true. Node *getValue(); - virtual void skip() { + virtual void skip() LLVM_OVERRIDE { getKey()->skip(); getValue()->skip(); } @@ -358,7 +358,7 @@ public: iterator end() { return iterator(); } - virtual void skip() { + virtual void skip() LLVM_OVERRIDE { yaml::skip(*this); } @@ -421,7 +421,7 @@ public: iterator end() { return iterator(); } - virtual void skip() { + virtual void skip() LLVM_OVERRIDE { yaml::skip(*this); } diff --git a/include/llvm/Support/circular_raw_ostream.h b/include/llvm/Support/circular_raw_ostream.h index 2b3c329..2823af3 100644 --- a/include/llvm/Support/circular_raw_ostream.h +++ b/include/llvm/Support/circular_raw_ostream.h @@ -81,12 +81,12 @@ namespace llvm Filled = false; } - virtual void write_impl(const char *Ptr, size_t Size); + virtual void write_impl(const char *Ptr, size_t Size) LLVM_OVERRIDE; /// current_pos - Return the current position within the stream, /// not counting the bytes currently in the buffer. /// - virtual uint64_t current_pos() const { + virtual uint64_t current_pos() const LLVM_OVERRIDE { // This has the same effect as calling TheStream.current_pos(), // but that interface is private. return TheStream->tell() - TheStream->GetNumBytesInBuffer(); diff --git a/include/llvm/Support/raw_os_ostream.h b/include/llvm/Support/raw_os_ostream.h index 4f5d361..4385721 100644 --- a/include/llvm/Support/raw_os_ostream.h +++ b/include/llvm/Support/raw_os_ostream.h @@ -24,14 +24,14 @@ namespace llvm { /// use the underlying stream to detect errors. class raw_os_ostream : public raw_ostream { std::ostream &OS; - + /// write_impl - See raw_ostream::write_impl. - virtual void write_impl(const char *Ptr, size_t Size); - + virtual void write_impl(const char *Ptr, size_t Size) LLVM_OVERRIDE; + /// current_pos - Return the current position within the stream, not /// counting the bytes currently in the buffer. - virtual uint64_t current_pos() const; - + virtual uint64_t current_pos() const LLVM_OVERRIDE; + public: raw_os_ostream(std::ostream &O) : OS(O) {} ~raw_os_ostream(); diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h index c8fb428..eab0f2d 100644 --- a/include/llvm/Support/raw_ostream.h +++ b/include/llvm/Support/raw_ostream.h @@ -322,14 +322,14 @@ class raw_fd_ostream : public raw_ostream { uint64_t pos; /// write_impl - See raw_ostream::write_impl. - virtual void write_impl(const char *Ptr, size_t Size); + virtual void write_impl(const char *Ptr, size_t Size) LLVM_OVERRIDE; /// current_pos - Return the current position within the stream, not /// counting the bytes currently in the buffer. - virtual uint64_t current_pos() const { return pos; } + virtual uint64_t current_pos() const LLVM_OVERRIDE { return pos; } /// preferred_buffer_size - Determine an efficient buffer size. - virtual size_t preferred_buffer_size() const; + virtual size_t preferred_buffer_size() const LLVM_OVERRIDE; /// error_detected - Set the flag indicating that an output error has /// been encountered. @@ -390,14 +390,14 @@ public: } virtual raw_ostream &changeColor(enum Colors colors, bool bold=false, - bool bg=false); - virtual raw_ostream &resetColor(); + bool bg=false) LLVM_OVERRIDE; + virtual raw_ostream &resetColor() LLVM_OVERRIDE; - virtual raw_ostream &reverseColor(); + virtual raw_ostream &reverseColor() LLVM_OVERRIDE; - virtual bool is_displayed() const; + virtual bool is_displayed() const LLVM_OVERRIDE; - virtual bool has_colors() const; + virtual bool has_colors() const LLVM_OVERRIDE; /// has_error - Return the value of the flag in this raw_fd_ostream indicating /// whether an output error has been encountered. @@ -443,11 +443,11 @@ class raw_string_ostream : public raw_ostream { std::string &OS; /// write_impl - See raw_ostream::write_impl. - virtual void write_impl(const char *Ptr, size_t Size); + virtual void write_impl(const char *Ptr, size_t Size) LLVM_OVERRIDE; /// current_pos - Return the current position within the stream, not /// counting the bytes currently in the buffer. - virtual uint64_t current_pos() const { return OS.size(); } + virtual uint64_t current_pos() const LLVM_OVERRIDE { return OS.size(); } public: explicit raw_string_ostream(std::string &O) : OS(O) {} ~raw_string_ostream(); @@ -467,11 +467,11 @@ class raw_svector_ostream : public raw_ostream { SmallVectorImpl<char> &OS; /// write_impl - See raw_ostream::write_impl. - virtual void write_impl(const char *Ptr, size_t Size); + virtual void write_impl(const char *Ptr, size_t Size) LLVM_OVERRIDE; /// current_pos - Return the current position within the stream, not /// counting the bytes currently in the buffer. - virtual uint64_t current_pos() const; + virtual uint64_t current_pos() const LLVM_OVERRIDE; public: /// Construct a new raw_svector_ostream. /// @@ -493,11 +493,11 @@ public: /// raw_null_ostream - A raw_ostream that discards all output. class raw_null_ostream : public raw_ostream { /// write_impl - See raw_ostream::write_impl. - virtual void write_impl(const char *Ptr, size_t size); + virtual void write_impl(const char *Ptr, size_t size) LLVM_OVERRIDE; /// current_pos - Return the current position within the stream, not /// counting the bytes currently in the buffer. - virtual uint64_t current_pos() const; + virtual uint64_t current_pos() const LLVM_OVERRIDE; public: explicit raw_null_ostream() {} diff --git a/include/llvm/Support/system_error.h b/include/llvm/Support/system_error.h index a36a7bb..0d164f6 100644 --- a/include/llvm/Support/system_error.h +++ b/include/llvm/Support/system_error.h @@ -653,7 +653,7 @@ public: class _do_message : public error_category { public: - virtual std::string message(int ev) const; + virtual std::string message(int ev) const LLVM_OVERRIDE; }; const error_category& generic_category(); |