summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/TinyPtrVector.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-07-18 16:35:57 +0000
committerChris Lattner <sabre@nondot.org>2011-07-18 16:35:57 +0000
commit22e522e08640be459f237796009cf7666d6d75e7 (patch)
tree8bbbcb51c039c8668ea8c4bc757155421d8964f3 /include/llvm/ADT/TinyPtrVector.h
parent1419f9206e6d321e5ccd8ae99a63d5cb98493bb5 (diff)
downloadllvm-22e522e08640be459f237796009cf7666d6d75e7.tar.gz
llvm-22e522e08640be459f237796009cf7666d6d75e7.tar.bz2
llvm-22e522e08640be459f237796009cf7666d6d75e7.tar.xz
various cleanups noticed by Frits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135396 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/TinyPtrVector.h')
-rw-r--r--include/llvm/ADT/TinyPtrVector.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/ADT/TinyPtrVector.h b/include/llvm/ADT/TinyPtrVector.h
index 70864b6d0f..ee86d8bdf7 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<VecTy*>())
return Vec->empty();
@@ -49,9 +49,9 @@ public:
unsigned size() const {
if (empty())
return 0;
- if (Val. template is<EltTy>())
+ if (Val.template is<EltTy>())
return 1;
- return Val. template get<VecTy*>()->size();
+ return Val.template get<VecTy*>()->size();
}
typedef const EltTy *iterator;
@@ -83,9 +83,9 @@ public:
return V;
}
- assert(i < Val. template get<VecTy*>()->size() &&
+ assert(i < Val.template get<VecTy*>()->size() &&
"tinyvector index out of range");
- return (*Val. template get<VecTy*>())[i];
+ return (*Val.template get<VecTy*>())[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<EltTy>()) {
+ if (EltTy V = Val.template dyn_cast<EltTy>()) {
Val = new VecTy();
Val.template get<VecTy*>()->push_back(V);
}