From c38c36a8c44bd32bdfc2e48ab3e447f6dc1547bd Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Mon, 17 Oct 2011 23:54:22 +0000 Subject: Object: Add isSymbolWeak. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142316 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/ObjectFile.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/llvm/Object/ObjectFile.h') diff --git a/include/llvm/Object/ObjectFile.h b/include/llvm/Object/ObjectFile.h index a0be264fe7..4fd73c667a 100644 --- a/include/llvm/Object/ObjectFile.h +++ b/include/llvm/Object/ObjectFile.h @@ -121,6 +121,9 @@ public: /// such as library functions error_code isGlobal(bool &Result) const; + /// Returns true for weak symbols. + error_code isWeak(bool &Result) const; + DataRefImpl getRawDataRefImpl() const; }; typedef content_iterator symbol_iterator; @@ -234,7 +237,7 @@ protected: virtual error_code getSymbolNMTypeChar(DataRefImpl Symb, char &Res) const = 0; virtual error_code isSymbolInternal(DataRefImpl Symb, bool &Res) const = 0; virtual error_code isSymbolGlobal(DataRefImpl Symb, bool &Res) const = 0; - + virtual error_code isSymbolWeak(DataRefImpl Symb, bool &Res) const = 0; // Same as above for SectionRef. friend class SectionRef; @@ -345,6 +348,10 @@ inline error_code SymbolRef::isGlobal(bool &Result) const { return OwningObject->isSymbolGlobal(SymbolPimpl, Result); } +inline error_code SymbolRef::isWeak(bool &Result) const { + return OwningObject->isSymbolWeak(SymbolPimpl, Result); +} + inline error_code SymbolRef::getType(SymbolRef::Type &Result) const { return OwningObject->getSymbolType(SymbolPimpl, Result); } -- cgit v1.2.3-18-g5258