Add back some typecasts I accidentally lost in r206142.
authorCraig Topper <craig.topper@gmail.com>
Mon, 14 Apr 2014 01:11:34 +0000 (01:11 +0000)
committerCraig Topper <craig.topper@gmail.com>
Mon, 14 Apr 2014 01:11:34 +0000 (01:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206143 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/TinyPtrVector.h

index 5e0a119b46f04cde50f9e314f25eb5363322ba20..5669b2a81a4027cede649ba36151e736c12b99b7 100644 (file)
@@ -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);
     }