diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2015-11-10 22:37:38 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2015-11-10 22:37:38 +0000 |
commit | 4154794892292f6e3866e4f56ec74d9efcd2b007 (patch) | |
tree | 53d69499d67df667a864b547b7f83e617a0aebac /lld/lib/ReaderWriter/MachO/File.h | |
parent | 4f2a6cb2480affe5b475366ab24076b6a23993d7 (diff) | |
download | bcm5719-llvm-4154794892292f6e3866e4f56ec74d9efcd2b007.tar.gz bcm5719-llvm-4154794892292f6e3866e4f56ec74d9efcd2b007.zip |
Fix Clang-tidy modernize-use-auto warnings, other minor fixes.
Differential revision: http://reviews.llvm.org/D14553
llvm-svn: 252661
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/File.h')
-rw-r--r-- | lld/lib/ReaderWriter/MachO/File.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lld/lib/ReaderWriter/MachO/File.h b/lld/lib/ReaderWriter/MachO/File.h index 364b8c2bd52..e9f2eed23a4 100644 --- a/lld/lib/ReaderWriter/MachO/File.h +++ b/lld/lib/ReaderWriter/MachO/File.h @@ -1,4 +1,4 @@ -//===- lib/ReaderWriter/MachO/File.h --------------------------------------===// +//===- lib/ReaderWriter/MachO/File.h ----------------------------*- C++ -*-===// // // The LLVM Linker // @@ -45,7 +45,7 @@ public: DefinedAtom::Alignment align( inSection->alignment, sectionOffset % inSection->alignment); - MachODefinedAtom *atom = + auto *atom = new (allocator()) MachODefinedAtom(*this, name, scope, type, merge, thumb, noDeadStrip, content, align); addAtomForSection(inSection, atom, sectionOffset); @@ -68,7 +68,7 @@ public: DefinedAtom::Alignment align( inSection->alignment, sectionOffset % inSection->alignment); - MachODefinedCustomSectionAtom *atom = + auto *atom = new (allocator()) MachODefinedCustomSectionAtom(*this, name, scope, type, merge, thumb, noDeadStrip, content, @@ -87,7 +87,7 @@ public: DefinedAtom::Alignment align( inSection->alignment, sectionOffset % inSection->alignment); - MachODefinedAtom *atom = + auto *atom = new (allocator()) MachODefinedAtom(*this, name, scope, size, noDeadStrip, align); addAtomForSection(inSection, atom, sectionOffset); @@ -98,8 +98,7 @@ public: // Make a copy of the atom's name that is owned by this file. name = name.copy(allocator()); } - SimpleUndefinedAtom *atom = - new (allocator()) SimpleUndefinedAtom(*this, name); + auto *atom = new (allocator()) SimpleUndefinedAtom(*this, name); addAtom(*atom); _undefAtoms[name] = atom; } @@ -110,7 +109,7 @@ public: // Make a copy of the atom's name that is owned by this file. name = name.copy(allocator()); } - MachOTentativeDefAtom *atom = + auto *atom = new (allocator()) MachOTentativeDefAtom(*this, name, scope, size, align); addAtom(*atom); _undefAtoms[name] = atom; @@ -200,7 +199,6 @@ private: addAtom(*atom); } - typedef llvm::DenseMap<const normalized::Section *, std::vector<SectionOffsetAndAtom>> SectionToAtoms; typedef llvm::StringMap<const lld::Atom *> NameToAtom; @@ -298,7 +296,6 @@ private: return nullptr; } - struct ReExportedDylib { ReExportedDylib(StringRef p) : path(p), file(nullptr) { } StringRef path; @@ -324,4 +321,4 @@ private: } // end namespace mach_o } // end namespace lld -#endif +#endif // LLD_READER_WRITER_MACHO_FILE_H |