Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185512 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2013-07-03 05:11:49 +00:00
parent d0a3916e43
commit f22fd3f7b5
14 changed files with 41 additions and 41 deletions

View File

@ -72,7 +72,8 @@ private:
class SDDbgInfo {
SmallVector<SDDbgValue*, 32> DbgValues;
SmallVector<SDDbgValue*, 32> ByvalParmDbgValues;
DenseMap<const SDNode*, SmallVector<SDDbgValue*, 2> > DbgValMap;
typedef DenseMap<const SDNode*, SmallVector<SDDbgValue*, 2> > DbgValMapType;
DbgValMapType DbgValMap;
void operator=(const SDDbgInfo&) LLVM_DELETED_FUNCTION;
SDDbgInfo(const SDDbgInfo&) LLVM_DELETED_FUNCTION;
@ -98,14 +99,13 @@ public:
}
ArrayRef<SDDbgValue*> getSDDbgValues(const SDNode *Node) {
DenseMap<const SDNode*, SmallVector<SDDbgValue*, 2> >::iterator I =
DbgValMap.find(Node);
DbgValMapType::iterator I = DbgValMap.find(Node);
if (I != DbgValMap.end())
return I->second;
return ArrayRef<SDDbgValue*>();
}
typedef SmallVector<SDDbgValue*,32>::iterator DbgIterator;
typedef SmallVectorImpl<SDDbgValue*>::iterator DbgIterator;
DbgIterator DbgBegin() { return DbgValues.begin(); }
DbgIterator DbgEnd() { return DbgValues.end(); }
DbgIterator ByvalParmDbgBegin() { return ByvalParmDbgValues.begin(); }