From d502f47726826e02cfca484e8eaae933260454b4 Mon Sep 17 00:00:00 2001 From: George Rimar Date: Thu, 14 Apr 2016 14:07:54 +0000 Subject: [PATCH] Make OutputSectionFactory::lookup() inline. NFC. Also I removed the last zero parameter of aggregate initialization as it is excessive here. llvm-svn: 266304 --- lld/ELF/Writer.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index b752ec1..c1c97d9 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -992,7 +992,10 @@ public: std::pair *, bool> create(InputSectionBase *C, StringRef OutsecName); - OutputSectionBase *lookup(StringRef Name, uint32_t Type, uintX_t Flags); + OutputSectionBase *lookup(StringRef Name, uint32_t Type, + uintX_t Flags) { + return Map.lookup({Name, Type, Flags}); + } private: SectionKey createKey(InputSectionBase *C, @@ -1030,13 +1033,6 @@ OutputSectionFactory::create(InputSectionBase *C, } template -OutputSectionBase *OutputSectionFactory::lookup(StringRef Name, - uint32_t Type, - uintX_t Flags) { - return Map.lookup({Name, Type, Flags, 0}); -} - -template SectionKey OutputSectionFactory::createKey(InputSectionBase *C, StringRef OutsecName) { -- 2.7.4