Fix crash during llvm_shutdown due to init order fiasco

Use the constexpr constructor for _MSC_VER >= 1925, otherwise
ManagedStatic will have a dynamic initializer, which depending on init
order, results in the Ptr field being overwritten with 0. This
eventually leads to multiple instances of the same ManagedStatic
instance in the StaticList, and asserts when double destroying during
llvm_shutdown.

I reported this bug [here](https://bugs.llvm.org/show_bug.cgi?id=49027),
and learned that this bug had already been fixed in upstream LLVM.

Note that llvm_subzero already has a similar change, though for _MSC_VER
>= 1920. According to the LLVM comment, the VC++ compiler up until 1925
may still emit a dynamic initializer for a constexpr constructor, but I
suppose we never ran into that for Subzero, so I'll leave this as is.

Bug: b/175782868
Change-Id: Ice3944f67e496aa94f1a7ed7502b49e763d702b4
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52508
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexis H├ętu <sugoi@google.com>
Tested-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
diff --git a/third_party/llvm-10.0/llvm/include/llvm/Support/ManagedStatic.h b/third_party/llvm-10.0/llvm/include/llvm/Support/ManagedStatic.h
index bbd0d04..f2b4142 100644
--- a/third_party/llvm-10.0/llvm/include/llvm/Support/ManagedStatic.h
+++ b/third_party/llvm-10.0/llvm/include/llvm/Support/ManagedStatic.h
@@ -40,8 +40,8 @@
 // constexpr, a dynamic initializer may be emitted depending on optimization
 // settings. For the affected versions of MSVC, use the old linker
 // initialization pattern of not providing a constructor and leaving the fields
-// uninitialized.
-#if !defined(_MSC_VER) || defined(__clang__)
+// uninitialized. See http://llvm.org/PR41367 for details.
+#if !defined(_MSC_VER) || (_MSC_VER >= 1925) || defined(__clang__)
 #define LLVM_USE_CONSTEXPR_CTOR
 #endif