Index: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp =================================================================== --- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp +++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp @@ -81,7 +81,7 @@ AsmPrinter::runOnMachineFunction(MF); - EmitXRayTable(); + emitXRayTable(); return true; } @@ -1148,39 +1148,6 @@ recordSled(CurSled, MI, Kind); } -void MipsAsmPrinter::EmitXRayTable() { - if (Sleds.empty()) - return; - if (Subtarget->isTargetELF()) { - auto PrevSection = OutStreamer->getCurrentSectionOnly(); - auto Fn = MF->getFunction(); - MCSection *Section; - - if (Fn->hasComdat()) - Section = OutContext.getELFSection("xray_instr_map", ELF::SHT_PROGBITS, - ELF::SHF_ALLOC | ELF::SHF_GROUP, 0, - Fn->getComdat()->getName()); - else - Section = - OutContext.getELFSection("xray_instr_map", ELF::SHT_PROGBITS, - ELF::SHF_ALLOC, 0, CurrentFnSym->getName()); - - OutStreamer->SwitchSection(Section); - for (const auto &Sled : Sleds) { - OutStreamer->EmitSymbolValue(Sled.Sled, Subtarget->isGP64bit() ? 8 : 4); - OutStreamer->EmitSymbolValue(CurrentFnSym, Subtarget->isGP64bit() ? 8 : 4); - auto Kind = static_cast(Sled.Kind); - OutStreamer->EmitBytes( - StringRef(reinterpret_cast(&Kind), 1)); - OutStreamer->EmitBytes( - StringRef(reinterpret_cast(&Sled.AlwaysInstrument), 1)); - OutStreamer->EmitZeros(Subtarget->isGP64bit() ? 14 : 6); - } - OutStreamer->SwitchSection(PrevSection); - } - Sleds.clear(); -} - void MipsAsmPrinter::LowerPATCHABLE_FUNCTION_ENTER(const MachineInstr &MI) { EmitSled(MI, SledKind::FUNCTION_ENTER); }