<div dir="ltr">Thanks, I just upgraded, and I checked GCC 5.1 on godbolt but of course I should have tested VS 2017. Although, I probably would not have tested a debug build.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 4, 2019 at 4:10 AM Simon Pilgrim via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.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">Author: rksimon<br>
Date: Thu Apr  4 04:12:30 2019<br>
New Revision: 357685<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=357685&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=357685&view=rev</a><br>
Log:<br>
Revert rL357655 and rL357656 from llvm/trunk:<br>
Fix minor innaccuracy in previous comment on ManagedStaticBase<br>
........<br>
Make ManagedStatic constexpr constructible<br>
<br>
Apparently it needs member initializers so that it can be constructed in<br>
a constexpr context. I explained my investigation of this in PR41367.<br>
........<br>
Causes vs2017 debug llvm-tblgen to fail with "Unknown command line argument" errors - similar to the vs2019 error discussed on PR41367 without the patch....<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/Support/ManagedStatic.h<br>
<br>
Modified: llvm/trunk/include/llvm/Support/ManagedStatic.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ManagedStatic.h?rev=357685&r1=357684&r2=357685&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ManagedStatic.h?rev=357685&r1=357684&r2=357685&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/Support/ManagedStatic.h (original)<br>
+++ llvm/trunk/include/llvm/Support/ManagedStatic.h Thu Apr  4 04:12:30 2019<br>
@@ -37,18 +37,13 @@ class ManagedStaticBase {<br>
 protected:<br>
   // This should only be used as a static variable, which guarantees that this<br>
   // will be zero initialized.<br>
-  mutable std::atomic<void *> Ptr{nullptr};<br>
-  mutable void (*DeleterFn)(void *) = nullptr;<br>
-  mutable const ManagedStaticBase *Next = nullptr;<br>
+  mutable std::atomic<void *> Ptr;<br>
+  mutable void (*DeleterFn)(void*);<br>
+  mutable const ManagedStaticBase *Next;<br>
<br>
   void RegisterManagedStatic(void *(*creator)(), void (*deleter)(void*)) const;<br>
<br>
 public:<br>
-  /// ManagedStaticBase must be constexpr constructed so that they can be<br>
-  /// accessed during dynamic initilization of other global variables, such as<br>
-  /// cl::opt command line flags.<br>
-  constexpr ManagedStaticBase() = default;<br>
-<br>
   /// isConstructed - Return true if this object has not been created yet.<br>
   bool isConstructed() const { return Ptr != nullptr; }<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>