ELF2: Make Defined{Regular,Weak} ctors look the same as other SymbolBody ctors.

llvm-svn: 244701
This commit is contained in:
Rui Ueyama 2015-08-11 23:37:25 +00:00
parent 021834046f
commit 4f89fdad9f
2 changed files with 3 additions and 8 deletions

View File

@ -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) {

View File

@ -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;