[lld] r244701 - ELF2: Make Defined{Regular, Weak} ctors look the same as other SymbolBody ctors.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 16:37:26 PDT 2015
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;
More information about the llvm-commits
mailing list