diff options
-rw-r--r-- | lld/ELF/Symbols.cpp | 6 | ||||
-rw-r--r-- | lld/ELF/Symbols.h | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp index d80aba499ff..13a91aab80b 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -116,12 +116,6 @@ static uint64_t getSymVA(const Symbol &Sym, int64_t &Addend) { llvm_unreachable("invalid symbol kind"); } -// Returns true if this is a weak undefined symbol. -bool Symbol::isUndefWeak() const { - // See comment on Lazy in Symbols.h for the details. - return isWeak() && (isUndefined() || isLazy()); -} - uint64_t Symbol::getVA(int64_t Addend) const { uint64_t OutVA = getSymVA(*this, Addend); return OutVA + Addend; diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h index c9ee2a00c5a..d7a89f81c4f 100644 --- a/lld/ELF/Symbols.h +++ b/lld/ELF/Symbols.h @@ -102,7 +102,10 @@ public: // True is this is an undefined weak symbol. This only works once // all input files have been added. - bool isUndefWeak() const; + bool isUndefWeak() const { + // See comment on Lazy the details. + return isWeak() && (isUndefined() || isLazy()); + } StringRef getName() const { return Name; } uint8_t getVisibility() const { return StOther & 0x3; } |