From 758377052dc75d2af56a7cfcce8826ad506e15e3 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 16 Jan 2017 20:28:59 +0000 Subject: [PATCH] Attempt to workaround MSVC build issue where I suspect an enum class constant 0 is considered a possible null pointer I can't reproduce this so far with web compilers, so throwing this at the bots to see if it sticks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292155 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/None.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/llvm/ADT/None.h b/include/llvm/ADT/None.h index 628b3ea8db9..c7a99c61994 100644 --- a/include/llvm/ADT/None.h +++ b/include/llvm/ADT/None.h @@ -19,7 +19,8 @@ namespace llvm { /// \brief A simple null object to allow implicit construction of Optional /// and similar types without having to spell out the specialization's name. -enum class NoneType { None }; +// (constant value 1 in an attempt to workaround MSVC build issue... ) +enum class NoneType { None = 1 }; const NoneType None = NoneType::None; } -- 2.50.1