forked from OSchip/llvm-project
ELF2: Make Defined{Regular,Weak} ctors look the same as other SymbolBody ctors.
llvm-svn: 244701
This commit is contained in:
parent
021834046f
commit
4f89fdad9f
|
@ -17,11 +17,6 @@ using namespace llvm::object;
|
||||||
using namespace lld;
|
using namespace lld;
|
||||||
using namespace lld::elf2;
|
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
|
// Returns 1, 0 or -1 if this symbol should take precedence
|
||||||
// over the Other, tie or lose, respectively.
|
// over the Other, tie or lose, respectively.
|
||||||
int SymbolBody::compare(SymbolBody *Other) {
|
int SymbolBody::compare(SymbolBody *Other) {
|
||||||
|
|
|
@ -76,7 +76,7 @@ protected:
|
||||||
// etc.
|
// etc.
|
||||||
class Defined : public SymbolBody {
|
class Defined : public SymbolBody {
|
||||||
public:
|
public:
|
||||||
Defined(Kind K, StringRef N = "") : SymbolBody(K, N) {}
|
explicit Defined(Kind K, StringRef N = "") : SymbolBody(K, N) {}
|
||||||
|
|
||||||
static bool classof(const SymbolBody *S) {
|
static bool classof(const SymbolBody *S) {
|
||||||
Kind K = S->kind();
|
Kind K = S->kind();
|
||||||
|
@ -87,7 +87,7 @@ public:
|
||||||
// Regular defined symbols read from object file symbol tables.
|
// Regular defined symbols read from object file symbol tables.
|
||||||
class DefinedRegular : public Defined {
|
class DefinedRegular : public Defined {
|
||||||
public:
|
public:
|
||||||
DefinedRegular(StringRef Name);
|
explicit DefinedRegular(StringRef N) : Defined(DefinedRegularKind, N) {}
|
||||||
|
|
||||||
static bool classof(const SymbolBody *S) {
|
static bool classof(const SymbolBody *S) {
|
||||||
return S->kind() == DefinedRegularKind;
|
return S->kind() == DefinedRegularKind;
|
||||||
|
@ -96,7 +96,7 @@ public:
|
||||||
|
|
||||||
class DefinedWeak : public Defined {
|
class DefinedWeak : public Defined {
|
||||||
public:
|
public:
|
||||||
DefinedWeak(StringRef Name);
|
explicit DefinedWeak(StringRef N) : Defined(DefinedWeakKind, N) {}
|
||||||
|
|
||||||
static bool classof(const SymbolBody *S) {
|
static bool classof(const SymbolBody *S) {
|
||||||
return S->kind() == DefinedWeakKind;
|
return S->kind() == DefinedWeakKind;
|
||||||
|
|
Loading…
Reference in New Issue