diff options
author | Craig Topper <craig.topper@gmail.com> | 2013-07-03 05:11:49 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2013-07-03 05:11:49 +0000 |
commit | f22fd3f7b557a967b1edc1fa9ae770006a39e97c (patch) | |
tree | 2adb341c05cd266b848277bc567e279836a4c95d /include/llvm/CodeGen | |
parent | d0a3916e430201d0179c723e4ebdd9bf4f0ee02b (diff) | |
download | external_llvm-f22fd3f7b557a967b1edc1fa9ae770006a39e97c.tar.gz external_llvm-f22fd3f7b557a967b1edc1fa9ae770006a39e97c.tar.bz2 external_llvm-f22fd3f7b557a967b1edc1fa9ae770006a39e97c.zip |
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
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAG.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 741eb08f72..79e533e787 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -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(); } |