From 01b72784c9f0b619e1cbc5b5c86267d6dcacab31 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 14 Apr 2014 01:11:34 +0000 Subject: [PATCH] Add back some typecasts I accidentally lost in r206142. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206143 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/TinyPtrVector.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/llvm/ADT/TinyPtrVector.h b/include/llvm/ADT/TinyPtrVector.h index 5e0a119b46f..5669b2a81a4 100644 --- a/include/llvm/ADT/TinyPtrVector.h +++ b/include/llvm/ADT/TinyPtrVector.h @@ -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()) - Val = nullptr; + Val = (EltTy)nullptr; else if (VecTy *Vec = Val.template get()) Vec->pop_back(); } @@ -218,7 +218,7 @@ public: // If we have a single value, convert to empty. if (Val.template is()) { if (I == begin()) - Val = nullptr; + Val = (EltTy)nullptr; } else if (VecTy *Vec = Val.template dyn_cast()) { // 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()) { if (S == begin() && S != E) - Val = nullptr; + Val = (EltTy)nullptr; } else if (VecTy *Vec = Val.template dyn_cast()) { return Vec->erase(S, E); } -- 2.34.1