[llvm] r206143 - Add back some typecasts I accidentally lost in r206142.

Craig Topper craig.topper at gmail.com
Sun Apr 13 18:11:35 PDT 2014


Author: ctopper
Date: Sun Apr 13 20:11:34 2014
New Revision: 206143

URL: http://llvm.org/viewvc/llvm-project?rev=206143&view=rev
Log:
Add back some typecasts I accidentally lost in r206142.

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

Modified: llvm/trunk/include/llvm/ADT/TinyPtrVector.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/TinyPtrVector.h?rev=206143&r1=206142&r2=206143&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/TinyPtrVector.h (original)
+++ llvm/trunk/include/llvm/ADT/TinyPtrVector.h Sun Apr 13 20:11:34 2014
@@ -92,7 +92,7 @@ public:
     }
 
     Val = RHS.Val;
-    RHS.Val = nullptr;
+    RHS.Val = (EltTy)nullptr;
     return *this;
   }
 
@@ -195,7 +195,7 @@ public:
   void pop_back() {
     // If we have a single value, convert to empty.
     if (Val.template is<EltTy>())
-      Val = nullptr;
+      Val = (EltTy)nullptr;
     else if (VecTy *Vec = Val.template get<VecTy*>())
       Vec->pop_back();
   }
@@ -218,7 +218,7 @@ public:
     // If we have a single value, convert to empty.
     if (Val.template is<EltTy>()) {
       if (I == begin())
-        Val = nullptr;
+        Val = (EltTy)nullptr;
     } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
       // multiple items in a vector; just do the erase, there is no
       // benefit to collapsing back to a pointer
@@ -234,7 +234,7 @@ public:
 
     if (Val.template is<EltTy>()) {
       if (S == begin() && S != E)
-        Val = nullptr;
+        Val = (EltTy)nullptr;
     } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
       return Vec->erase(S, E);
     }





More information about the llvm-commits mailing list