[lld] r222021 - Silence inconsistent override warnings.

Eric Christopher echristo at gmail.com
Fri Nov 14 11:55:24 PST 2014


On Fri Nov 14 2014 at 11:07:18 AM David Blaikie <dblaikie at gmail.com> wrote:

> On Fri, Nov 14, 2014 at 10:44 AM, Eric Christopher <echristo at gmail.com>
> wrote:
>
>> Author: echristo
>> Date: Fri Nov 14 12:44:53 2014
>> New Revision: 222021
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=222021&view=rev
>> Log:
>> Silence inconsistent override warnings.
>>
>> Modified:
>>     lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h
>>
>> Modified: lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h?rev=222021&r1=222020&r2=222021&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h (original)
>> +++ lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h Fri Nov 14 12:44:53
>> 2014
>> @@ -46,10 +46,10 @@ public:
>>
>>    /// \brief Modify the section contents before assigning virtual
>> addresses
>>    //  or assigning file offsets
>> -  virtual void doPreFlight() {}
>> +  virtual void doPreFlight() override {}
>>
>
> We usually just specify one of virtual, override, or final. I removed a
> few redundant virtuals (including these ones) in r222023.
>
>

Hey cool, thanks.

-eric


>
>>    /// \brief Finalize the section contents before writing
>> -  virtual void finalize() {}
>> +  virtual void finalize() override {}
>>
>>    /// \brief Does this section have an output segment.
>>    virtual bool hasOutputSegment() {
>> @@ -73,7 +73,7 @@ public:
>>    Layout::SegmentType getSegmentType() const { return _segmentType; }
>>
>>    /// \brief Return the type of content that the section contains
>> -  virtual int getContentType() const {
>> +  virtual int getContentType() const override {
>>      if (_flags & llvm::ELF::SHF_EXECINSTR)
>>        return Chunk<ELFT>::ContentType::Code;
>>      else if (_flags & llvm::ELF::SHF_WRITE)
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141114/fdd66f31/attachment.html>


More information about the llvm-commits mailing list