+ bool hasInstructions() const { return HasInstructions; }
+ void setHasInstructions(bool Value) { HasInstructions = Value; }
+
+ /// @}
+
+ void dump();
+};
+
+// FIXME: Same concerns as with SectionData.
+class MCSymbolData : public ilist_node<MCSymbolData> {
+public:
+ const MCSymbol *Symbol;
+
+ /// Fragment - The fragment this symbol's value is relative to, if any.
+ MCFragment *Fragment;
+
+ /// Offset - The offset to apply to the fragment address to form this symbol's
+ /// value.
+ uint64_t Offset;
+
+ /// IsExternal - True if this symbol is visible outside this translation
+ /// unit.
+ unsigned IsExternal : 1;
+
+ /// IsPrivateExtern - True if this symbol is private extern.
+ unsigned IsPrivateExtern : 1;
+
+ /// CommonSize - The size of the symbol, if it is 'common', or 0.
+ //
+ // FIXME: Pack this in with other fields? We could put it in offset, since a
+ // common symbol can never get a definition.
+ uint64_t CommonSize;
+
+ /// CommonAlign - The alignment of the symbol, if it is 'common'.
+ //
+ // FIXME: Pack this in with other fields?
+ unsigned CommonAlign;
+
+ /// Flags - The Flags field is used by object file implementations to store
+ /// additional per symbol information which is not easily classified.
+ uint32_t Flags;
+
+ /// Index - Index field, for use by the object file implementation.
+ uint64_t Index;
+
+public:
+ // Only for use as sentinel.
+ MCSymbolData();
+ MCSymbolData(const MCSymbol &_Symbol, MCFragment *_Fragment, uint64_t _Offset,
+ MCAssembler *A = 0);
+
+ /// @name Accessors
+ /// @{
+
+ const MCSymbol &getSymbol() const { return *Symbol; }
+
+ MCFragment *getFragment() const { return Fragment; }
+ void setFragment(MCFragment *Value) { Fragment = Value; }
+
+ uint64_t getOffset() const { return Offset; }
+ void setOffset(uint64_t Value) { Offset = Value; }
+
+ /// @}
+ /// @name Symbol Attributes
+ /// @{
+
+ bool isExternal() const { return IsExternal; }
+ void setExternal(bool Value) { IsExternal = Value; }
+
+ bool isPrivateExtern() const { return IsPrivateExtern; }
+ void setPrivateExtern(bool Value) { IsPrivateExtern = Value; }
+
+ /// isCommon - Is this a 'common' symbol.
+ bool isCommon() const { return CommonSize != 0; }
+
+ /// setCommon - Mark this symbol as being 'common'.
+ ///
+ /// \param Size - The size of the symbol.
+ /// \param Align - The alignment of the symbol.
+ void setCommon(uint64_t Size, unsigned Align) {
+ CommonSize = Size;
+ CommonAlign = Align;