[llvm] r211246 - Fix breakage from r211244 by using LLVM_EXPLICIT to avoid using explicit operators under MSVC where they're not supported.

David Blaikie dblaikie at gmail.com
Wed Jun 18 18:09:50 PDT 2014


Author: dblaikie
Date: Wed Jun 18 20:09:49 2014
New Revision: 211246

URL: http://llvm.org/viewvc/llvm-project?rev=211246&view=rev
Log:
Fix breakage from r211244 by using LLVM_EXPLICIT to avoid using explicit operators under MSVC where they're not supported.

Modified:
    llvm/trunk/include/llvm/Support/StringPool.h

Modified: llvm/trunk/include/llvm/Support/StringPool.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/StringPool.h?rev=211246&r1=211245&r2=211246&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/StringPool.h (original)
+++ llvm/trunk/include/llvm/Support/StringPool.h Wed Jun 18 20:09:49 2014
@@ -29,6 +29,7 @@
 #ifndef LLVM_SUPPORT_STRINGPOOL_H
 #define LLVM_SUPPORT_STRINGPOOL_H
 
+#include "llvm/Support/Compiler.h"
 #include "llvm/ADT/StringMap.h"
 #include <cassert>
 #include <new>
@@ -128,7 +129,7 @@ namespace llvm {
     }
 
     inline const char *operator*() const { return begin(); }
-    inline explicit operator bool() const { return S != nullptr; }
+    inline LLVM_EXPLICIT operator bool() const { return S != nullptr; }
 
     inline bool operator==(const PooledStringPtr &That) const { return S == That.S; }
     inline bool operator!=(const PooledStringPtr &That) const { return S != That.S; }





More information about the llvm-commits mailing list