<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 24, 2015 at 4:59 PM, Saleem Abdulrasool <span dir="ltr"><<a href="mailto:abdulras@fb.com" target="_blank">abdulras@fb.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">REPOSITORY<br>
  rL LLVM<br>
<br>
================<br>
Comment at: lib/CodeGen/CGDebugInfo.cpp:2379-2382<br>
@@ -2378,4 +2378,6 @@<br>
</span><span class="">   // we have support for emitting declarations of (non-member) global variables.<br>
-  VDContext = getContextDescriptor(<br>
-      dyn_cast<Decl>(VD->isStaticDataMember() ? VD->getLexicalDeclContext()<br>
-                                              : VD->getDeclContext()));<br>
+  const DeclContext *DC = VD->isStaticDataMember() ? VD->getLexicalDeclContext()<br>
+                                                   : VD->getDeclContext();<br>
+  while (DC->isRecord())<br>
+    DC = DC->getParent();<br>
+  VDContext = getContextDescriptor(dyn_cast<Decl>(DC));<br>
</span>----------------<br>
<span class="">friss wrote:<br>
> The message makes it look like this change addresses a very particular case related to dllexport, yet the logic makes no mention of it. Care to elaborate why this doesn't change anything is other cases?<br>
</span>The dllexport simply makes it easier to expose the issue as the member will be forcefully instantiated, and thus force the materialization of the debug info.<br></blockquote><div><br>You reckon this behavior could be tickled without dllexport? I think in any other case you'd need an explicit external definition - only in dllexport have I seen a definition manifested without one written outside the class.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
<a href="http://reviews.llvm.org/D7872" target="_blank">http://reviews.llvm.org/D7872</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>