[PATCH] D36615: [XRay][CodeGen] Imbue attributes to the labels for XRay instrumentation
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 11 08:54:35 PDT 2017
dblaikie added a comment.
Don't know enough about ELF attributes to review the point of this patch, sorry.
================
Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:2793-2796
+ InstMap = OutContext.getELFSection(
+ "xray_instr_map", ELF::SHT_PROGBITS, ELF::SHF_ALLOC);
+ FnSledIndex = OutContext.getELFSection(
+ "xray_fn_idx", ELF::SHT_PROGBITS, ELF::SHF_ALLOC);
----------------
Unrelated reformatting? (or I can't spot what the change is on these lines)
================
Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:2823-2828
+ if (MF->getSubtarget().getTargetTriple().isOSBinFormatELF()) {
+ OutStreamer->EmitSymbolAttribute(SledsStart, MCSymbolAttr::MCSA_Hidden);
+ OutStreamer->EmitSymbolAttribute(SledsStart, MCSymbolAttr::MCSA_Local);
+ OutStreamer->EmitSymbolAttribute(SledsStart,
+ MCSymbolAttr::MCSA_ELF_TypeNoType);
+ }
----------------
Repetitious - reformat to a common function, perhaps?
https://reviews.llvm.org/D36615
More information about the llvm-commits
mailing list