[llvm-commits] [llvm] r135396 - /llvm/trunk/include/llvm/ADT/TinyPtrVector.h
Chris Lattner
sabre at nondot.org
Mon Jul 18 09:35:57 PDT 2011
Author: lattner
Date: Mon Jul 18 11:35:57 2011
New Revision: 135396
URL: http://llvm.org/viewvc/llvm-project?rev=135396&view=rev
Log:
various cleanups noticed by Frits
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=135396&r1=135395&r2=135396&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/TinyPtrVector.h (original)
+++ llvm/trunk/include/llvm/ADT/TinyPtrVector.h Mon Jul 18 11:35:57 2011
@@ -37,9 +37,9 @@
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 @@
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 @@
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 @@
}
// 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);
}
More information about the llvm-commits
mailing list