[llvm] f49c2a8 - [ADT] Remove None=1 MSVC workaround

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 20 01:07:09 PST 2022


Author: Fangrui Song
Date: 2022-11-20T09:07:03Z
New Revision: f49c2a8c365917a704d2f9af49c83892b9ae167f

URL: https://github.com/llvm/llvm-project/commit/f49c2a8c365917a704d2f9af49c83892b9ae167f
DIFF: https://github.com/llvm/llvm-project/commit/f49c2a8c365917a704d2f9af49c83892b9ae167f.diff

LOG: [ADT] Remove None=1 MSVC workaround

This workaround from 0cd22f9540c0591132ec991c51103cf800cf4e24 (2017-01) is very
likely unneeded.

Added: 
    

Modified: 
    llvm/include/llvm/ADT/None.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/None.h b/llvm/include/llvm/ADT/None.h
index 1a66be4097df..b3dc18089683 100644
--- a/llvm/include/llvm/ADT/None.h
+++ b/llvm/include/llvm/ADT/None.h
@@ -19,8 +19,7 @@
 namespace llvm {
 /// A simple null object to allow implicit construction of Optional<T>
 /// and similar types without having to spell out the specialization's name.
-// (constant value 1 in an attempt to workaround MSVC build issue... )
-enum class NoneType { None = 1 };
+enum class NoneType { None };
 const NoneType None = NoneType::None;
 }
 


        


More information about the llvm-commits mailing list