+ /// getName - Get the symbol name.
+ StringRef getName() const { return Name; }
+
+ /// @name Accessors
+ /// @{
+
+ /// isTemporary - Check if this is an assembler temporary symbol.
+ bool isTemporary() const { return IsTemporary; }
+
+ /// isUsedInExpr - Check if this is an assembler temporary symbol.
+ bool isUsedInExpr() const { return IsUsedInExpr; }
+ void setUsedInExpr(bool Value) { IsUsedInExpr = Value; }
+
+ /// @}
+ /// @name Associated Sections
+ /// @{
+
+ /// 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;
+ }
+
+ /// isInSection - Check if this symbol is defined in some section (i.e., it
+ /// is defined but not absolute).
+ bool isInSection() const {
+ return isDefined() && !isAbsolute();
+ }
+
+ /// isUndefined - Check if this symbol undefined (i.e., implicitly defined).
+ bool isUndefined() const {
+ return !isDefined();
+ }
+
+ /// isAbsolute - Check if this is an absolute symbol.
+ bool isAbsolute() const {
+ return Section == AbsolutePseudoSection;
+ }
+
+ /// getSection - Get the section associated with a defined, non-absolute
+ /// symbol.
+ const MCSection &getSection() const {
+ assert(isInSection() && "Invalid accessor!");
+ return *Section;
+ }
+
+ /// setSection - Mark the symbol as defined in the section \arg S.
+ void setSection(const MCSection &S) { Section = &S; }
+
+ /// setUndefined - Mark the symbol as undefined.
+ void setUndefined() {
+ Section = 0;
+ }
+
+ /// setAbsolute - Mark the symbol as absolute.
+ void setAbsolute() { Section = AbsolutePseudoSection; }
+
+ /// @}
+ /// @name Variable Symbols
+ /// @{
+
+ /// isVariable - Check if this is a variable symbol.
+ bool isVariable() const {
+ return Value != 0;
+ }
+
+ /// getValue() - Get the value for variable symbols.
+ const MCExpr *getVariableValue() const {
+ assert(isVariable() && "Invalid accessor!");
+ return Value;
+ }
+
+ void setVariableValue(const MCExpr *Value);
+
+ /// @}
+
+ /// print - Print the value to the stream \arg OS.
+ void print(raw_ostream &OS) const;
+
+ /// dump - Print the value to stderr.
+ void dump() const;