[lld] r244701 - ELF2: Make Defined{Regular, Weak} ctors look the same as other SymbolBody ctors.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 17:50:14 PDT 2015
Thanks!
On Aug 11, 2015 7:38 PM, "Rui Ueyama via llvm-commits" <
llvm-commits at lists.llvm.org> wrote:
> Author: ruiu
> Date: Tue Aug 11 18:37:25 2015
> New Revision: 244701
>
> URL: http://llvm.org/viewvc/llvm-project?rev=244701&view=rev
> Log:
> ELF2: Make Defined{Regular,Weak} ctors look the same as other SymbolBody
> ctors.
>
> Modified:
> lld/trunk/ELF/Symbols.cpp
> lld/trunk/ELF/Symbols.h
>
> Modified: lld/trunk/ELF/Symbols.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=244701&r1=244700&r2=244701&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/Symbols.cpp (original)
> +++ lld/trunk/ELF/Symbols.cpp Tue Aug 11 18:37:25 2015
> @@ -17,11 +17,6 @@ using namespace llvm::object;
> using namespace lld;
> using namespace lld::elf2;
>
> -DefinedRegular::DefinedRegular(StringRef Name)
> - : Defined(DefinedRegularKind, Name) {}
> -
> -DefinedWeak::DefinedWeak(StringRef Name) : Defined(DefinedWeakKind, Name)
> {}
> -
> // Returns 1, 0 or -1 if this symbol should take precedence
> // over the Other, tie or lose, respectively.
> int SymbolBody::compare(SymbolBody *Other) {
>
> Modified: lld/trunk/ELF/Symbols.h
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=244701&r1=244700&r2=244701&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/Symbols.h (original)
> +++ lld/trunk/ELF/Symbols.h Tue Aug 11 18:37:25 2015
> @@ -76,7 +76,7 @@ protected:
> // etc.
> class Defined : public SymbolBody {
> public:
> - Defined(Kind K, StringRef N = "") : SymbolBody(K, N) {}
> + explicit Defined(Kind K, StringRef N = "") : SymbolBody(K, N) {}
>
> static bool classof(const SymbolBody *S) {
> Kind K = S->kind();
> @@ -87,7 +87,7 @@ public:
> // Regular defined symbols read from object file symbol tables.
> class DefinedRegular : public Defined {
> public:
> - DefinedRegular(StringRef Name);
> + explicit DefinedRegular(StringRef N) : Defined(DefinedRegularKind, N) {}
>
> static bool classof(const SymbolBody *S) {
> return S->kind() == DefinedRegularKind;
> @@ -96,7 +96,7 @@ public:
>
> class DefinedWeak : public Defined {
> public:
> - DefinedWeak(StringRef Name);
> + explicit DefinedWeak(StringRef N) : Defined(DefinedWeakKind, N) {}
>
> static bool classof(const SymbolBody *S) {
> return S->kind() == DefinedWeakKind;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150811/4094f418/attachment.html>
More information about the llvm-commits
mailing list