llvm.org GIT mirror llvm / 49e139b
[C++11] Remove 'virtual' keyword from methods marked with 'override' keyword. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203442 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 5 years ago
14 changed file(s) with 65 addition(s) and 70 deletion(s). Raw diff Collapse all Expand all
7878 public:
7979 MallocSlabAllocator() : Allocator() { }
8080 virtual ~MallocSlabAllocator();
81 virtual MemSlab *Allocate(size_t Size) override;
82 virtual void Deallocate(MemSlab *Slab) override;
81 MemSlab *Allocate(size_t Size) override;
82 void Deallocate(MemSlab *Slab) override;
8383 };
8484
8585 /// BumpPtrAllocator - This allocator is useful for containers that need
5656 ///
5757 const char *Scanned;
5858
59 virtual void write_impl(const char *Ptr, size_t Size) override;
59 void write_impl(const char *Ptr, size_t Size) override;
6060
6161 /// current_pos - Return the current position within the stream,
6262 /// not counting the bytes currently in the buffer.
63 virtual uint64_t current_pos() const override {
63 uint64_t current_pos() const override {
6464 // Our current position in the stream is all the contents which have been
6565 // written to the underlying stream (*not* the current position of the
6666 // underlying stream).
4949 const char *Str;
5050 public:
5151 PrettyStackTraceString(const char *str) : Str(str) {}
52 virtual void print(raw_ostream &OS) const override;
52 void print(raw_ostream &OS) const override;
5353 };
5454
5555 /// PrettyStackTraceProgram - This object prints a specified program arguments
6262 : ArgC(argc), ArgV(argv) {
6363 EnablePrettyStackTrace();
6464 }
65 virtual void print(raw_ostream &OS) const override;
65 void print(raw_ostream &OS) const override;
6666 };
6767
6868 } // end namespace llvm
3838 /// getBase - Returns the lowest valid address in the region.
3939 ///
4040 /// @result - The lowest valid address.
41 virtual uint64_t getBase() const override = 0;
41 uint64_t getBase() const override = 0;
4242
4343 /// getExtent - Returns the size of the region in bytes. (The region is
4444 /// contiguous, so the highest valid address of the region
4646 /// May block until all bytes in the stream have been read
4747 ///
4848 /// @result - The size of the region.
49 virtual uint64_t getExtent() const override = 0;
49 uint64_t getExtent() const override = 0;
5050
5151 /// readByte - Tries to read a single byte from the region.
5252 /// May block until (address - base) bytes have been read
5454 /// @param ptr - A pointer to a byte to be filled in. Must be non-NULL.
5555 /// @result - 0 if successful; -1 if not. Failure may be due to a
5656 /// bounds violation or an implementation-specific error.
57 virtual int readByte(uint64_t address, uint8_t *ptr) const override = 0;
57 int readByte(uint64_t address, uint8_t *ptr) const override = 0;
5858
5959 /// readBytes - Tries to read a contiguous range of bytes from the
6060 /// region, up to the end of the region.
7070 /// and large enough to hold size bytes.
7171 /// @result - 0 if successful; -1 if not. Failure may be due to a
7272 /// bounds violation or an implementation-specific error.
73 virtual int readBytes(uint64_t address,
74 uint64_t size,
75 uint8_t *buf) const override = 0;
73 int readBytes(uint64_t address, uint64_t size,
74 uint8_t *buf) const override = 0;
7675
7776 /// getPointer - Ensures that the requested data is in memory, and returns
7877 /// A pointer to it. More efficient than using readBytes if the
105104 class StreamingMemoryObject : public StreamableMemoryObject {
106105 public:
107106 StreamingMemoryObject(DataStreamer *streamer);
108 virtual uint64_t getBase() const override { return 0; }
109 virtual uint64_t getExtent() const override;
110 virtual int readByte(uint64_t address, uint8_t *ptr) const override;
111 virtual int readBytes(uint64_t address,
112 uint64_t size,
113 uint8_t *buf) const override;
114 virtual const uint8_t *getPointer(uint64_t address,
115 uint64_t size) const override {
107 uint64_t getBase() const override { return 0; }
108 uint64_t getExtent() const override;
109 int readByte(uint64_t address, uint8_t *ptr) const override;
110 int readBytes(uint64_t address, uint64_t size,
111 uint8_t *buf) const override;
112 const uint8_t *getPointer(uint64_t address, uint64_t size) const override {
116113 // This could be fixed by ensuring the bytes are fetched and making a copy,
117114 // requiring that the bitcode size be known, or otherwise ensuring that
118115 // the memory doesn't go away/get reallocated, but it's
120117 assert(0 && "getPointer in streaming memory objects not allowed");
121118 return NULL;
122119 }
123 virtual bool isValidAddress(uint64_t address) const override;
124 virtual bool isObjectEnd(uint64_t address) const override;
120 bool isValidAddress(uint64_t address) const override;
121 bool isObjectEnd(uint64_t address) const override;
125122
126123 /// Drop s bytes from the front of the stream, pushing the positions of the
127124 /// remaining bytes down by s. This is used to skip past the bitcode header,
250250 /// @returns The value, or nullptr if failed() == true.
251251 Node *getValue();
252252
253 virtual void skip() override {
253 void skip() override {
254254 getKey()->skip();
255255 getValue()->skip();
256256 }
364364
365365 iterator end() { return iterator(); }
366366
367 virtual void skip() override {
367 void skip() override {
368368 yaml::skip(*this);
369369 }
370370
425425
426426 iterator end() { return iterator(); }
427427
428 virtual void skip() override {
428 void skip() override {
429429 yaml::skip(*this);
430430 }
431431
8080 Filled = false;
8181 }
8282
83 virtual void write_impl(const char *Ptr, size_t Size) override;
83 void write_impl(const char *Ptr, size_t Size) override;
8484
8585 /// current_pos - Return the current position within the stream,
8686 /// not counting the bytes currently in the buffer.
8787 ///
88 virtual uint64_t current_pos() const override {
88 uint64_t current_pos() const override {
8989 // This has the same effect as calling TheStream.current_pos(),
9090 // but that interface is private.
9191 return TheStream->tell() - TheStream->GetNumBytesInBuffer();
2525 std::ostream &OS;
2626
2727 /// write_impl - See raw_ostream::write_impl.
28 virtual void write_impl(const char *Ptr, size_t Size) override;
28 void write_impl(const char *Ptr, size_t Size) override;
2929
3030 /// current_pos - Return the current position within the stream, not
3131 /// counting the bytes currently in the buffer.
32 virtual uint64_t current_pos() const override;
32 uint64_t current_pos() const override;
3333
3434 public:
3535 raw_os_ostream(std::ostream &O) : OS(O) {}
321321 uint64_t pos;
322322
323323 /// write_impl - See raw_ostream::write_impl.
324 virtual void write_impl(const char *Ptr, size_t Size) override;
324 void write_impl(const char *Ptr, size_t Size) override;
325325
326326 /// current_pos - Return the current position within the stream, not
327327 /// counting the bytes currently in the buffer.
328 virtual uint64_t current_pos() const override { return pos; }
328 uint64_t current_pos() const override { return pos; }
329329
330330 /// preferred_buffer_size - Determine an efficient buffer size.
331 virtual size_t preferred_buffer_size() const override;
331 size_t preferred_buffer_size() const override;
332332
333333 /// error_detected - Set the flag indicating that an output error has
334334 /// been encountered.
372372 UseAtomicWrites = Value;
373373 }
374374
375 virtual raw_ostream &changeColor(enum Colors colors, bool bold=false,
376 bool bg=false) override;
377 virtual raw_ostream &resetColor() override;
378
379 virtual raw_ostream &reverseColor() override;
380
381 virtual bool is_displayed() const override;
382
383 virtual bool has_colors() const override;
375 raw_ostream &changeColor(enum Colors colors, bool bold=false,
376 bool bg=false) override;
377 raw_ostream &resetColor() override;
378
379 raw_ostream &reverseColor() override;
380
381 bool is_displayed() const override;
382
383 bool has_colors() const override;
384384
385385 /// has_error - Return the value of the flag in this raw_fd_ostream indicating
386386 /// whether an output error has been encountered.
426426 std::string &OS;
427427
428428 /// write_impl - See raw_ostream::write_impl.
429 virtual void write_impl(const char *Ptr, size_t Size) override;
429 void write_impl(const char *Ptr, size_t Size) override;
430430
431431 /// current_pos - Return the current position within the stream, not
432432 /// counting the bytes currently in the buffer.
433 virtual uint64_t current_pos() const override { return OS.size(); }
433 uint64_t current_pos() const override { return OS.size(); }
434434 public:
435435 explicit raw_string_ostream(std::string &O) : OS(O) {}
436436 ~raw_string_ostream();
450450 SmallVectorImpl &OS;
451451
452452 /// write_impl - See raw_ostream::write_impl.
453 virtual void write_impl(const char *Ptr, size_t Size) override;
453 void write_impl(const char *Ptr, size_t Size) override;
454454
455455 /// current_pos - Return the current position within the stream, not
456456 /// counting the bytes currently in the buffer.
457 virtual uint64_t current_pos() const override;
457 uint64_t current_pos() const override;
458458 public:
459459 /// Construct a new raw_svector_ostream.
460460 ///
476476 /// raw_null_ostream - A raw_ostream that discards all output.
477477 class raw_null_ostream : public raw_ostream {
478478 /// write_impl - See raw_ostream::write_impl.
479 virtual void write_impl(const char *Ptr, size_t size) override;
479 void write_impl(const char *Ptr, size_t size) override;
480480
481481 /// current_pos - Return the current position within the stream, not
482482 /// counting the bytes currently in the buffer.
483 virtual uint64_t current_pos() const override;
483 uint64_t current_pos() const override;
484484
485485 public:
486486 explicit raw_null_ostream() {}
651651 class _do_message : public error_category
652652 {
653653 public:
654 virtual std::string message(int ev) const override;
654 std::string message(int ev) const override;
655655 };
656656
657657 const error_category& generic_category();
161161
162162 protected:
163163 /// UpdatedSearchState - Callback used when the search state changes.
164 virtual void UpdatedSearchState(const changeset_ty &Changes,
164 void UpdatedSearchState(const changeset_ty &Changes,
165165 const changesetlist_ty &Sets) override {
166166 DDAI.UpdatedSearchState(Changes, Sets, Required);
167167 }
168168
169 virtual bool ExecuteOneTest(const changeset_ty &S) override {
169 bool ExecuteOneTest(const changeset_ty &S) override {
170170 return DDAI.GetTestResult(S, Required);
171171 }
172172
5757 virtual ~DataFileStreamer() {
5858 close(Fd);
5959 }
60 virtual size_t GetBytes(unsigned char *buf, size_t len) override {
60 size_t GetBytes(unsigned char *buf, size_t len) override {
6161 NumStreamFetches++;
6262 return read(Fd, buf, len);
6363 }
9090 init(InputData.begin(), InputData.end(), RequiresNullTerminator);
9191 }
9292
93 virtual const char *getBufferIdentifier() const override {
93 const char *getBufferIdentifier() const override {
9494 // The name is stored after the class itself.
9595 return reinterpret_cast(this + 1);
9696 }
9797
98 virtual BufferKind getBufferKind() const override {
98 BufferKind getBufferKind() const override {
9999 return MemoryBuffer_Malloc;
100100 }
101101 };
216216 }
217217 }
218218
219 virtual const char *getBufferIdentifier() const override {
219 const char *getBufferIdentifier() const override {
220220 // The name is stored after the class itself.
221221 return reinterpret_cast(this + 1);
222222 }
223223
224 virtual BufferKind getBufferKind() const override {
224 BufferKind getBufferKind() const override {
225225 return MemoryBuffer_MMap;
226226 }
227227 };
2424 assert(LastChar >= FirstChar && "Invalid start/end range");
2525 }
2626
27 virtual uint64_t getBase() const override { return 0; }
28 virtual uint64_t getExtent() const override {
27 uint64_t getBase() const override { return 0; }
28 uint64_t getExtent() const override {
2929 return LastChar - FirstChar;
3030 }
31 virtual int readByte(uint64_t address, uint8_t* ptr) const override;
32 virtual int readBytes(uint64_t address,
33 uint64_t size,
34 uint8_t *buf) const override;
35 virtual const uint8_t *getPointer(uint64_t address,
36 uint64_t size) const override;
37 virtual bool isValidAddress(uint64_t address) const override {
31 int readByte(uint64_t address, uint8_t* ptr) const override;
32 int readBytes(uint64_t address, uint64_t size,
33 uint8_t *buf) const override;
34 const uint8_t *getPointer(uint64_t address, uint64_t size) const override;
35 bool isValidAddress(uint64_t address) const override {
3836 return validAddress(address);
3937 }
40 virtual bool isObjectEnd(uint64_t address) const override {
38 bool isObjectEnd(uint64_t address) const override {
4139 return objectEnd(address);
4240 }
4341
4747
4848 class _generic_error_category : public _do_message {
4949 public:
50 virtual const char* name() const override;
51 virtual std::string message(int ev) const override;
50 const char* name() const override;
51 std::string message(int ev) const override;
5252 };
5353
5454 const char*
7373
7474 class _system_error_category : public _do_message {
7575 public:
76 virtual const char* name() const override;
77 virtual std::string message(int ev) const override;
78 virtual error_condition default_error_condition(int ev) const override;
76 const char* name() const override;
77 std::string message(int ev) const override;
78 error_condition default_error_condition(int ev) const override;
7979 };
8080
8181 const char*