OS << "\t.inst";
if (Suffix)
OS << "." << Suffix;
- OS << "\t0x" << utohexstr(Inst) << "\n";
+ OS << "\t0x" << Twine::utohexstr(Inst) << "\n";
}
void ARMTargetAsmStreamer::emitUnwindRaw(int64_t Offset,
for (SmallVectorImpl<uint8_t>::const_iterator OCI = Opcodes.begin(),
OCE = Opcodes.end();
OCI != OCE; ++OCI)
- OS << ", 0x" << utohexstr(*OCI);
+ OS << ", 0x" << Twine::utohexstr(*OCI);
OS << '\n';
}
unsigned EmittedArch;
SmallVector<AttributeItem, 64> Contents;
- const MCSection *AttributeSection;
+ MCSection *AttributeSection;
AttributeItem *getAttributeItem(unsigned Attribute) {
for (size_t i = 0; i < Contents.size(); ++i)
void emitRegSave(const SmallVectorImpl<unsigned> &RegList, bool isVector);
void emitUnwindRaw(int64_t Offset, const SmallVectorImpl<uint8_t> &Opcodes);
- void ChangeSection(const MCSection *Section,
- const MCExpr *Subsection) override {
+ void ChangeSection(MCSection *Section, const MCExpr *Subsection) override {
// We have to keep track of the mapping symbol state of any sections we
// use. Each one should start off as EMS_None, which is provided as the
// default constructor by DenseMap::lookup.
getContext().getOrCreateSymbol(Name + "." +
Twine(MappingSymbolCounter++));
- MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol);
- MCELF::SetType(SD, ELF::STT_NOTYPE);
- MCELF::SetBinding(SD, ELF::STB_LOCAL);
+ getAssembler().registerSymbol(*Symbol);
+ MCSymbol &SD = Symbol->getData();
+ MCELF::SetType(*Symbol, ELF::STT_NOTYPE);
+ MCELF::SetBinding(*Symbol, ELF::STB_LOCAL);
SD.setExternal(false);
AssignSection(Symbol, getCurrentSection().first);
using namespace ARMBuildAttrs;
setAttributeItem(CPU_name,
- ARMTargetParser::getArchDefaultCPUName(Arch),
+ ARMTargetParser::getCPUAttr(Arch),
false);
if (EmittedArch == ARM::AK_INVALID)
setAttributeItem(CPU_arch,
- ARMTargetParser::getArchDefaultCPUArch(Arch),
+ ARMTargetParser::getArchAttr(Arch),
false);
else
setAttributeItem(CPU_arch,
- ARMTargetParser::getArchDefaultCPUArch(EmittedArch),
+ ARMTargetParser::getArchAttr(EmittedArch),
false);
switch (Arch) {
if (!Streamer.IsThumb)
return;
- const MCSymbolData &SD = Streamer.getOrCreateSymbolData(Symbol);
- unsigned Type = MCELF::GetType(SD);
+ Streamer.getOrCreateSymbolData(Symbol);
+ unsigned Type = MCELF::GetType(*Symbol);
if (Type == ELF_STT_Func || Type == ELF_STT_GnuIFunc)
Streamer.EmitThumbFunc(Symbol);
}
const MCSymbol *Group = FnSection.getGroup();
if (Group)
Flags |= ELF::SHF_GROUP;
- const MCSectionELF *EHSection =
+ MCSectionELF *EHSection =
getContext().getELFSection(EHSecName, Type, Flags, 0, Group,
FnSection.getUniqueID(), nullptr, &FnSection);