[lld] r266304 - Make OutputSectionFactory::lookup() inline. NFC.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 14 07:21:57 PDT 2016
clang warns on it:
Writer.cpp:997:41: warning: missing field 'Alignment' initializer
On 14 April 2016 at 10:07, George Rimar via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: grimar
> Date: Thu Apr 14 09:07:54 2016
> New Revision: 266304
>
> URL: http://llvm.org/viewvc/llvm-project?rev=266304&view=rev
> Log:
> Make OutputSectionFactory::lookup() inline. NFC.
>
> Also I removed the last zero parameter of
> aggregate initialization as it is excessive here.
>
> Modified:
> lld/trunk/ELF/Writer.cpp
>
> Modified: lld/trunk/ELF/Writer.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=266304&r1=266303&r2=266304&view=diff
> ==============================================================================
> --- lld/trunk/ELF/Writer.cpp (original)
> +++ lld/trunk/ELF/Writer.cpp Thu Apr 14 09:07:54 2016
> @@ -992,7 +992,10 @@ public:
> 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,
> @@ -1030,13 +1033,6 @@ OutputSectionFactory<ELFT>::create(Input
> }
>
> 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,
> StringRef OutsecName) {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list