<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 13 Sep 2017, at 23:07, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: HelveticaNeue; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Sep 12, 2017 at 10:42 PM Dean Michael Berris via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">dberris created this revision.<br class="">Herald added a subscriber: aprantl.<br class=""><br class="">XRay had been assuming that the previous section is the "text" section<br class="">of the function. Unfortunately for in-lined functions where we're also<br class="">generating the comdat definition for debugging purposes, we may be<br class="">coming from a section that isn't "text" (could be .zdebug_types).<br class=""></blockquote><div class=""><br class="">This statement "unfortunately for in-lined functions where we're also generating the comdat definition for debugging purposes" is still confusing to me - I don't think this has anything to do with comdats.<br class=""></div></div></div></div></blockquote><div><br class=""></div>Yes, I've updated the description. PTAL.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: HelveticaNeue; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote"><div class=""><br class="">Indeed I think the test case you mentioned having had no inline functions at all - just that if type units are enabled and any debug types are emitted during endFunction, then that causes a switch to the debug_types section, rather than the text section. (most of the DWARF emission is delayed - we mostly don't switch to DWARF sections and produce DWARF bytes until the end of the module - except for type units, since they're whole/complete by themselves the moment we emit the type, so for those we do it immediately - causing section changes)<br class=""> </div></div></div></div></blockquote><div><br class=""></div><div>That's correct. Please see the updated description?</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: HelveticaNeue; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><br class="">This fixes an issue with combining -gsplit-dwarf and -fxray-instrument<br class="">for functions inlined, where the original definition may be lowered<br class="">into the debug sections. When the debug section is stripped, we're<br class="">left with references from the xray_instr_map to the debug section. The<br class="">change now uses the function's symbol instead of the previous<br class="">section's start symbol.<br class=""><br class=""><br class=""><a href="https://reviews.llvm.org/D37791" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/D37791</a><br class=""><br class="">Files:<br class=""> <span class="Apple-converted-space"> </span>lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br class=""><br class=""><br class="">Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br class="">===================================================================<br class="">--- lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br class="">+++ lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br class="">@@ -2785,7 +2785,7 @@<br class="">   MCSection *InstMap = nullptr;<br class="">   MCSection *FnSledIndex = nullptr;<br class="">   if (MF->getSubtarget().getTargetTriple().isOSBinFormatELF()) {<br class="">-    auto Associated = dyn_cast<MCSymbolELF>(PrevSection->getBeginSymbol());<br class="">+    auto Associated = dyn_cast<MCSymbolELF>(CurrentFnSym);<br class="">     assert(Associated != nullptr);<br class="">     auto Flags = ELF::SHF_WRITE | ELF::SHF_ALLOC | ELF::SHF_LINK_ORDER;<br class="">     std::string GroupName;<br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a></blockquote></div></div></div></blockquote></div><br class=""></body></html>