[PATCH] D14310: [LLD] Fix Clang-tidy modernize-use-override warnings, other minor fixes

Eugene Zelenko via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 16:48:05 PST 2015


Eugene.Zelenko created this revision.
Eugene.Zelenko added a reviewer: ruiu.
Eugene.Zelenko added a subscriber: llvm-commits.
Eugene.Zelenko set the repository for this revision to rL LLVM.

I checked this patch on my own build on RHEL 6. Regressions were OK.

Repository:
  rL LLVM

http://reviews.llvm.org/D14310

Files:
  ELF/OutputSections.h
  lib/ReaderWriter/MachO/SectCreateFile.h

Index: lib/ReaderWriter/MachO/SectCreateFile.h
===================================================================
--- lib/ReaderWriter/MachO/SectCreateFile.h
+++ lib/ReaderWriter/MachO/SectCreateFile.h
@@ -23,7 +23,6 @@
 //
 class SectCreateFile : public File {
 public:
-
   class SectCreateAtom : public SimpleDefinedAtom {
   public:
     SectCreateAtom(const File &file, StringRef segName, StringRef sectName,
@@ -68,19 +67,19 @@
       new (allocator()) SectCreateAtom(*this, seg, sect, std::move(content)));
   }
 
-  const AtomVector<DefinedAtom> &defined() const {
+  const AtomVector<DefinedAtom> &defined() const override {
     return _definedAtoms;
   }
 
-  const AtomVector<UndefinedAtom> &undefined() const {
+  const AtomVector<UndefinedAtom> &undefined() const override {
     return _noUndefinedAtoms;
   }
 
-  const AtomVector<SharedLibraryAtom> &sharedLibrary() const {
+  const AtomVector<SharedLibraryAtom> &sharedLibrary() const override {
     return _noSharedLibraryAtoms;
   }
 
-  const AtomVector<AbsoluteAtom> &absolute() const {
+  const AtomVector<AbsoluteAtom> &absolute() const override {
     return _noAbsoluteAtoms;
   }
 
Index: ELF/OutputSections.h
===================================================================
--- ELF/OutputSections.h
+++ ELF/OutputSections.h
@@ -247,7 +247,7 @@
 class InterpSection final : public OutputSectionBase<ELFT> {
 public:
   InterpSection();
-  void writeTo(uint8_t *Buf);
+  void writeTo(uint8_t *Buf) override;
 };
 
 template <class ELFT>
@@ -385,6 +385,8 @@
 template <class ELFT> StringTableSection<ELFT> *Out<ELFT>::StrTab;
 template <class ELFT> SymbolTableSection<ELFT> *Out<ELFT>::DynSymTab;
 template <class ELFT> SymbolTableSection<ELFT> *Out<ELFT>::SymTab;
-}
-}
-#endif
+
+} // namespace elf2
+} // namespace lld
+
+#endif // LLD_ELF_OUTPUT_SECTIONS_H


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14310.39133.patch
Type: text/x-patch
Size: 1841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151104/4bba1e13/attachment.bin>


More information about the llvm-commits mailing list