summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/MC/MCSymbol.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/include/llvm/MC/MCSymbol.h b/llvm/include/llvm/MC/MCSymbol.h
index 122e897a92d..37a2755328f 100644
--- a/llvm/include/llvm/MC/MCSymbol.h
+++ b/llvm/include/llvm/MC/MCSymbol.h
@@ -63,9 +63,16 @@ namespace llvm {
/// @name Symbol Type
/// @{
+ /// isDefined - Check if this symbol is defined (i.e., it has an address).
+ ///
+ /// Defined symbols are either absolute or in some section.
+ bool isDefined() const {
+ return Section != 0;
+ }
+
/// isUndefined - Check if this symbol undefined (i.e., implicitly defined).
bool isUndefined() const {
- return Section == 0;
+ return !isDefined();
}
/// isAbsolute - Check if this this is an absolute symbol.
OpenPOWER on IntegriCloud