summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorSimon Dardis <simon.dardis@imgtec.com>2017-05-04 11:03:50 +0000
committerSimon Dardis <simon.dardis@imgtec.com>2017-05-04 11:03:50 +0000
commit080d478bd2908b75c7680325f7a39a4d61dc84e6 (patch)
tree24483f00ba5404a83adef306a41bddff1d2349c4 /llvm
parente81233d0edf0b1313a6cc219ff6d4a506dadd66b (diff)
downloadbcm5719-llvm-080d478bd2908b75c7680325f7a39a4d61dc84e6.tar.gz
bcm5719-llvm-080d478bd2908b75c7680325f7a39a4d61dc84e6.zip
[mips][XRay] Use the base version of emitXRayTable
Follow up rL290858 by removing the MIPS specific version of XRayTable emission in favour of the basic version. This resolves a buildbot failure where the ELF sections were malformed causing the linker to reject the object files with xray related sections. Reviewers: dberris, slthakur Differential Revision: https://reviews.llvm.org/D32808 llvm-svn: 302138
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/Mips/MipsAsmPrinter.cpp35
1 files changed, 1 insertions, 34 deletions
diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
index 134f7ac3aea..9cdbf510737 100644
--- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
+++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
@@ -81,7 +81,7 @@ bool MipsAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
AsmPrinter::runOnMachineFunction(MF);
- EmitXRayTable();
+ emitXRayTable();
return true;
}
@@ -1148,39 +1148,6 @@ void MipsAsmPrinter::EmitSled(const MachineInstr &MI, SledKind Kind) {
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<uint8_t>(Sled.Kind);
- OutStreamer->EmitBytes(
- StringRef(reinterpret_cast<const char *>(&Kind), 1));
- OutStreamer->EmitBytes(
- StringRef(reinterpret_cast<const char *>(&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);
}
OpenPOWER on IntegriCloud