[PATCH] D80433: [clang-tblgen][CommandLine][ManagedStatic] Fix build errors with clang-tblgen in Debug mode using MSVC 2019 v16.6

Denys Petrov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 22 08:01:45 PDT 2020


ASDenysPetrov marked an inline comment as done.
ASDenysPetrov added inline comments.


================
Comment at: llvm/include/llvm/Support/ManagedStatic.h:47
+// (https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?redirectedfrom=MSDN&view=vs-2019).
+#if (defined(_MSC_VER) && (_MSC_VER >= 1925)) || defined(__clang__)
 #define LLVM_USE_CONSTEXPR_CTOR
----------------
RKSimon wrote:
> Won't this no longer fire on gcc builds? Maybe this:
> ```
> #if !defined(_MSC_VER) || defined(__clang__) || (defined(_MSC_VER) && (_MSC_VER >= 1925))
> ```
Thank you. I somehow missed this case.
It'd be even better this:
```
#if !defined(_MSC_VER) || (_MSC_VER >= 1925)
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80433/new/

https://reviews.llvm.org/D80433





More information about the llvm-commits mailing list