Skip to content

Commit

Permalink
Make OutputSectionFactory::lookup() inline. NFC.
Browse files Browse the repository at this point in the history
Also I removed the last zero parameter of 
aggregate initialization as it is excessive here.

llvm-svn: 266304
  • Loading branch information
George Rimar committed Apr 14, 2016
1 parent 2122168 commit d502f47
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lld/ELF/Writer.cpp
Expand Up @@ -992,7 +992,10 @@ template <class ELFT> class OutputSectionFactory {
std::pair<OutputSectionBase<ELFT> *, bool> create(InputSectionBase<ELFT> *C,
StringRef OutsecName);

OutputSectionBase<ELFT> *lookup(StringRef Name, uint32_t Type, uintX_t Flags);
OutputSectionBase<ELFT> *lookup(StringRef Name, uint32_t Type,
uintX_t Flags) {
return Map.lookup({Name, Type, Flags});
}

private:
SectionKey<ELFT::Is64Bits> createKey(InputSectionBase<ELFT> *C,
Expand Down Expand Up @@ -1029,13 +1032,6 @@ OutputSectionFactory<ELFT>::create(InputSectionBase<ELFT> *C,
return {Sec, true};
}

template <class ELFT>
OutputSectionBase<ELFT> *OutputSectionFactory<ELFT>::lookup(StringRef Name,
uint32_t Type,
uintX_t Flags) {
return Map.lookup({Name, Type, Flags, 0});
}

template <class ELFT>
SectionKey<ELFT::Is64Bits>
OutputSectionFactory<ELFT>::createKey(InputSectionBase<ELFT> *C,
Expand Down

0 comments on commit d502f47

Please sign in to comment.