uint64_t CommonSize;
};
- /// SymbolSize - An expression describing how to calculate the size of
- /// a symbol. If a symbol has no size this field will be NULL.
- const MCExpr *SymbolSize = nullptr;
-
/// CommonAlign - The alignment of the symbol, if it is 'common', or -1.
//
// FIXME: Pack this in with other fields?
return CommonSize;
}
- void setSize(const MCExpr *SS) { SymbolSize = SS; }
-
- const MCExpr *getSize() const { return SymbolSize; }
-
/// getCommonAlignment - Return the alignment of a 'common' symbol.
unsigned getCommonAlignment() const {
assert(isCommon() && "Not a 'common' symbol!");
/// Index field, for use by the object file implementation.
mutable uint64_t Index : 60;
+ /// An expression describing how to calculate the size of a symbol. If a
+ /// symbol has no size this field will be NULL.
+ const MCExpr *SymbolSize = nullptr;
+
mutable MCSymbolData Data;
private: // MCContext creates and uniques these.
Index = Value;
}
+ void setSize(const MCExpr *SS) { SymbolSize = SS; }
+
+ const MCExpr *getSize() const { return SymbolSize; }
+
/// print - Print the value to the stream \p OS.
void print(raw_ostream &OS) const;
uint64_t Value = SymbolValue(*MSD.Symbol, Layout);
uint64_t Size = 0;
- const MCExpr *ESize = OrigData.getSize();
+ const MCExpr *ESize = MSD.Symbol->getSize();
if (!ESize && Base)
- ESize = BaseSD->getSize();
+ ESize = Base->getSize();
if (ESize) {
int64_t Res;
SD.setCommon(Size, ByteAlignment);
}
- SD.setSize(MCConstantExpr::Create(Size, getContext()));
+ Symbol->setSize(MCConstantExpr::Create(Size, getContext()));
}
void MCELFStreamer::EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) {
- MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol);
- SD.setSize(Value);
+ Symbol->setSize(Value);
}
void MCELFStreamer::EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,