[llvm-commits] [llvm] r80057 - /llvm/trunk/include/llvm/MC/MCSymbol.h

Daniel Dunbar daniel at zuster.org
Tue Aug 25 17:10:55 PDT 2009


Author: ddunbar
Date: Tue Aug 25 19:10:55 2009
New Revision: 80057

URL: http://llvm.org/viewvc/llvm-project?rev=80057&view=rev
Log:
llvm-mc: Add MCSection::isDefined()

Modified:
    llvm/trunk/include/llvm/MC/MCSymbol.h

Modified: llvm/trunk/include/llvm/MC/MCSymbol.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSymbol.h?rev=80057&r1=80056&r2=80057&view=diff

==============================================================================
--- llvm/trunk/include/llvm/MC/MCSymbol.h (original)
+++ llvm/trunk/include/llvm/MC/MCSymbol.h Tue Aug 25 19:10:55 2009
@@ -63,9 +63,16 @@
     /// @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.





More information about the llvm-commits mailing list