void WriteNlist32(MachSymbolData &MSD) {
MCSymbolData &Data = *MSD.SymbolData;
- MCSymbol &Symbol = Data.getSymbol();
+ const MCSymbol &Symbol = Data.getSymbol();
uint8_t Type = 0;
uint16_t Flags = Data.getFlags();
uint32_t Address = 0;
// files.
for (MCAssembler::symbol_iterator it = Asm.symbol_begin(),
ie = Asm.symbol_end(); it != ie; ++it) {
- MCSymbol &Symbol = it->getSymbol();
+ const MCSymbol &Symbol = it->getSymbol();
// Ignore assembler temporaries.
if (it->getSymbol().isTemporary())
// Now add the data for local symbols.
for (MCAssembler::symbol_iterator it = Asm.symbol_begin(),
ie = Asm.symbol_end(); it != ie; ++it) {
- MCSymbol &Symbol = it->getSymbol();
+ const MCSymbol &Symbol = it->getSymbol();
// Ignore assembler temporaries.
if (it->getSymbol().isTemporary())
/* *** */
-MCSymbolData::MCSymbolData() : Symbol(*(MCSymbol*)0) {}
+MCSymbolData::MCSymbolData() : Symbol(0) {}
-MCSymbolData::MCSymbolData(MCSymbol &_Symbol, MCFragment *_Fragment,
+MCSymbolData::MCSymbolData(const MCSymbol &_Symbol, MCFragment *_Fragment,
uint64_t _Offset, MCAssembler *A)
- : Symbol(_Symbol), Fragment(_Fragment), Offset(_Offset),
+ : Symbol(&_Symbol), Fragment(_Fragment), Offset(_Offset),
IsExternal(false), IsPrivateExtern(false),
CommonSize(0), CommonAlign(0), Flags(0), Index(0)
{
/* *** */
-MCAssembler::MCAssembler(raw_ostream &_OS)
- : OS(_OS),
- SubsectionsViaSymbols(false)
+MCAssembler::MCAssembler(MCContext &_Context, raw_ostream &_OS)
+ : Context(_Context), OS(_OS), SubsectionsViaSymbols(false)
{
}