aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCSymbol.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-26 00:10:55 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-26 00:10:55 +0000
commite1f62b247c1096b501951ac7253658334c038b65 (patch)
tree7f00f0e28c6544e30fe65820b63e35e716e66e3f /include/llvm/MC/MCSymbol.h
parent638d853ef028b446715ac4e0b1a059d68769b465 (diff)
downloadexternal_llvm-e1f62b247c1096b501951ac7253658334c038b65.zip
external_llvm-e1f62b247c1096b501951ac7253658334c038b65.tar.gz
external_llvm-e1f62b247c1096b501951ac7253658334c038b65.tar.bz2
llvm-mc: Add MCSection::isDefined()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCSymbol.h')
-rw-r--r--include/llvm/MC/MCSymbol.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/llvm/MC/MCSymbol.h b/include/llvm/MC/MCSymbol.h
index 122e897..37a2755 100644
--- a/include/llvm/MC/MCSymbol.h
+++ b/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.