aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Object/ObjectFile.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Object/ObjectFile.h')
-rw-r--r--include/llvm/Object/ObjectFile.h9
1 files changed, 8 insertions, 1 deletions
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<SymbolRef> 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);
}