From 22e522e08640be459f237796009cf7666d6d75e7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 18 Jul 2011 16:35:57 +0000 Subject: [PATCH] various cleanups noticed by Frits git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135396 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/TinyPtrVector.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/llvm/ADT/TinyPtrVector.h b/include/llvm/ADT/TinyPtrVector.h index 70864b6d0f6..ee86d8bdf70 100644 --- a/include/llvm/ADT/TinyPtrVector.h +++ b/include/llvm/ADT/TinyPtrVector.h @@ -37,9 +37,9 @@ public: delete V; } - /// empty() - This vector can be empty if it contains no element, or if it - /// contains a pointer to an empty vector. bool empty() const { + // This vector can be empty if it contains no element, or if it + // contains a pointer to an empty vector. if (Val.isNull()) return true; if (VecTy *Vec = Val.template dyn_cast()) return Vec->empty(); @@ -49,9 +49,9 @@ public: unsigned size() const { if (empty()) return 0; - if (Val. template is()) + if (Val.template is()) return 1; - return Val. template get()->size(); + return Val.template get()->size(); } typedef const EltTy *iterator; @@ -83,9 +83,9 @@ public: return V; } - assert(i < Val. template get()->size() && + assert(i < Val.template get()->size() && "tinyvector index out of range"); - return (*Val. template get())[i]; + return (*Val.template get())[i]; } EltTy front() const { @@ -105,7 +105,7 @@ public: } // If we have a single value, convert to a vector. - if (EltTy V = Val.template dyn_cast()) { + if (EltTy V = Val.template dyn_cast()) { Val = new VecTy(); Val.template get()->push_back(V); }