[llvm] r230010 - Make the static instance of None just const.

Benjamin Kramer benny.kra at googlemail.com
Fri Feb 20 05:16:05 PST 2015


Author: d0k
Date: Fri Feb 20 07:16:05 2015
New Revision: 230010

URL: http://llvm.org/viewvc/llvm-project?rev=230010&view=rev
Log:
Make the static instance of None just const.

This way there shouldn't be any unused variable warnings.

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

Modified: llvm/trunk/include/llvm/ADT/None.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/None.h?rev=230010&r1=230009&r2=230010&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/None.h (original)
+++ llvm/trunk/include/llvm/ADT/None.h Fri Feb 20 07:16:05 2015
@@ -20,7 +20,7 @@ namespace llvm {
 /// \brief A simple null object to allow implicit construction of Optional<T>
 /// and similar types without having to spell out the specialization's name.
 enum class NoneType { None };
-static NoneType None;
+const NoneType None = None;
 }
 
 #endif





More information about the llvm-commits mailing list