/// Bindings of names to symbols.
SymbolTable Symbols;
- /// ELF sections can have a corresponding symbol. This maps one to the
+ /// Sections can have a corresponding symbol. This maps one to the
/// other.
- DenseMap<const MCSectionELF *, MCSymbolELF *> SectionSymbols;
+ DenseMap<const MCSection *, MCSymbol *> SectionSymbols;
/// A mapping from a local label number and an instance count to a symbol.
/// For example, in the assembly
}
MCSymbolELF *MCContext::getOrCreateSectionSymbol(const MCSectionELF &Section) {
- MCSymbolELF *&Sym = SectionSymbols[&Section];
+ MCSymbol *&Sym = SectionSymbols[&Section];
if (Sym)
- return Sym;
+ return cast<MCSymbolELF>(Sym);
StringRef Name = Section.getSectionName();
auto NameIter = UsedNames.insert(std::make_pair(Name, false)).first;
Sym = new (&*NameIter, *this) MCSymbolELF(&*NameIter, /*isTemporary*/ false);
- return Sym;
+ return cast<MCSymbolELF>(Sym);
}
MCSymbol *MCContext::getOrCreateFrameAllocSymbol(StringRef FuncName,