<div dir="ltr">Yep.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 19, 2014 at 1:23 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Looks good with a small tweak below...<br>
<br>
================<br>
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:3508<br>
@@ -3505,3 +3507,3 @@<br>
 const std::error_category &llvm::BitcodeErrorCategory() {<br>
-  static BitcodeErrorCategoryType O;<br>
-  return O;<br>
+  static ManagedStatic<BitcodeErrorCategoryType> O;<br>
+  return *O;<br>
----------------<br>
Since we can't rely on MSVC's thread safe function local statics we have to use a ManagedStatic here... but once we do, on non MSVC we pay the once-init cost twice.<br>
<br>
I would just make these globals (sadly) until we only rely on MSVC versions with support for killing managed static entirely.<br>
<br>
<a href="http://reviews.llvm.org/D5416" target="_blank">http://reviews.llvm.org/D5416</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>