/// The alignment is stored as log2(align) + 1. This allows all values from
/// 0 to 2^31 to be stored which is every power of 2 representable by an
/// unsigned.
/// The alignment is stored as log2(align) + 1. This allows all values from
/// 0 to 2^31 to be stored which is every power of 2 representable by an
/// unsigned.
unsigned CommonAlignLog2 : NumCommonAlignmentBits;
/// The Flags field is used by object file implementations to store
/// additional per symbol information which is not easily classified.
unsigned CommonAlignLog2 : NumCommonAlignmentBits;
/// The Flags field is used by object file implementations to store
/// additional per symbol information which is not easily classified.
mutable uint32_t Flags : NumFlagsBits;
/// Index field, for use by the object file implementation.
mutable uint32_t Flags : NumFlagsBits;
/// Index field, for use by the object file implementation.
if (MCFragment *F = getFragment())
return F->getParent();
const auto &SectionOrFragment = SectionOrFragmentAndHasName.getPointer();
if (MCFragment *F = getFragment())
return F->getParent();
const auto &SectionOrFragment = SectionOrFragmentAndHasName.getPointer();
/// isDefined - Check if this symbol is defined (i.e., it has an address).
///
/// Defined symbols are either absolute or in some section.
/// isDefined - Check if this symbol is defined (i.e., it has an address).
///
/// Defined symbols are either absolute or in some section.
/// isInSection - Check if this symbol is defined in some section (i.e., it
/// is defined but not absolute).
/// isInSection - Check if this symbol is defined in some section (i.e., it
/// is defined but not absolute).
- MCSection &getSection() const {
- assert(isInSection() && "Invalid accessor!");
- return *getSectionPtr();
+ MCSection &getSection(bool SetUsed = true) const {
+ assert(isInSection(SetUsed) && "Invalid accessor!");
+ return *getSectionPtr(SetUsed);
- /// getVariableValue() - Get the value for variable symbols.
- const MCExpr *getVariableValue() const {
+ /// getVariableValue - Get the value for variable symbols.
+ const MCExpr *getVariableValue(bool SetUsed = true) const {