<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 20, 2015 at 5:16 AM, Benjamin Kramer <span dir="ltr"><<a href="mailto:benny.kra@googlemail.com" target="_blank">benny.kra@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: d0k<br>
Date: Fri Feb 20 07:16:05 2015<br>
New Revision: 230010<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=230010&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=230010&view=rev</a><br>
Log:<br>
Make the static instance of None just const.<br>
<br>
This way there shouldn't be any unused variable warnings.<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/ADT/None.h<br>
<br>
Modified: llvm/trunk/include/llvm/ADT/None.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/None.h?rev=230010&r1=230009&r2=230010&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/None.h?rev=230010&r1=230009&r2=230010&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ADT/None.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/None.h Fri Feb 20 07:16:05 2015<br>
@@ -20,7 +20,7 @@ namespace llvm {<br>
 /// \brief A simple null object to allow implicit construction of Optional<T><br>
 /// and similar types without having to spell out the specialization's name.<br>
 enum class NoneType { None };<br></blockquote><div><br>At this point NoneType could just be an opaque/trivial struct instead of an enum class?<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-static NoneType None;<br>
+const NoneType None = None;<br></blockquote><div><br>Does this result in ODR violations? (either because None is not defined in the program at all and it is ODR used, or because this is a definition (?) and it's in multiple translation units? - I always forget which)<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 }<br>
<br>
 #endif<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>