<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 27 January 2017 at 14:44, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><span class="gmail-"><div dir="ltr">On Fri, Jan 27, 2017 at 2:11 PM Mehdi AMINI via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">mehdi_amini accepted this revision.<br class="gmail-m_-7795487497842314754gmail_msg">
mehdi_amini added a comment.<br class="gmail-m_-7795487497842314754gmail_msg">
This revision is now accepted and ready to land.<br class="gmail-m_-7795487497842314754gmail_msg">
<br class="gmail-m_-7795487497842314754gmail_msg">
LGTM.<br class="gmail-m_-7795487497842314754gmail_msg">
<br class="gmail-m_-7795487497842314754gmail_msg">
<br class="gmail-m_-7795487497842314754gmail_msg">
<br class="gmail-m_-7795487497842314754gmail_msg">
================<br class="gmail-m_-7795487497842314754gmail_msg">
Comment at: lib/AST/ASTContext.cpp:8909<br class="gmail-m_-7795487497842314754gmail_msg">
+<br class="gmail-m_-7795487497842314754gmail_msg">
+    // Itanium ABI (& MSVC seems to do similarly) requires static locals in<br class="gmail-m_-7795487497842314754gmail_msg">
+    // inline functions to be emitted anywhere they're needed, even if the<br class="gmail-m_-7795487497842314754gmail_msg">
----------------<br class="gmail-m_-7795487497842314754gmail_msg">
I assume you looked it up, do you have a ref? (Citation or pointer to right section/paragraph).<br class="gmail-m_-7795487497842314754gmail_msg"></blockquote></span><div><br>Would you like a citation in source? I thought that might be a bit strong since this is ABI-neutral code, notionally (so I was straddling that line a bit).<br><br>I can't quite figure out how to navigate/find the ABI document nor cast the runes as Richard did for the citation, so hopefully he can chime in here.</div></div></div></blockquote><div><br></div><div><a href="https://itanium-cxx-abi.github.io/cxx-abi/abi.html#vague-static">https://itanium-cxx-abi.github.io/cxx-abi/abi.html#vague-static</a><br></div><div><br></div><div>5.2.2: "Each COMDAT group [for a static local variable] must be emitted in any object with references to the symbol for the object it contains, whether inline or out-of-line."</div></div></div></div>