diff options
author | Craig Topper <craig.topper@gmail.com> | 2013-07-04 01:31:24 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2013-07-04 01:31:24 +0000 |
commit | 6227d5c690504c7ada5780c00a635b282c46e275 (patch) | |
tree | b0e11b1821db02d0e9b86095ff0d67c627f915bd /lib/IR/GCOV.cpp | |
parent | c589a5f2849620306b14077b16e51a3e0b7ef5cd (diff) | |
download | llvm-6227d5c690504c7ada5780c00a635b282c46e275.tar.gz llvm-6227d5c690504c7ada5780c00a635b282c46e275.tar.bz2 llvm-6227d5c690504c7ada5780c00a635b282c46e275.tar.xz |
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/GCOV.cpp')
-rw-r--r-- | lib/IR/GCOV.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/IR/GCOV.cpp b/lib/IR/GCOV.cpp index 2497950080..e9baa5c8cb 100644 --- a/lib/IR/GCOV.cpp +++ b/lib/IR/GCOV.cpp @@ -63,7 +63,7 @@ bool GCOVFile::read(GCOVBuffer &Buffer) { /// dump - Dump GCOVFile content on standard out for debugging purposes. void GCOVFile::dump() { - for (SmallVector<GCOVFunction *, 16>::iterator I = Functions.begin(), + for (SmallVectorImpl<GCOVFunction *>::iterator I = Functions.begin(), E = Functions.end(); I != E; ++I) (*I)->dump(); } @@ -71,7 +71,7 @@ void GCOVFile::dump() { /// collectLineCounts - Collect line counts. This must be used after /// reading .gcno and .gcda files. void GCOVFile::collectLineCounts(FileInfo &FI) { - for (SmallVector<GCOVFunction *, 16>::iterator I = Functions.begin(), + for (SmallVectorImpl<GCOVFunction *>::iterator I = Functions.begin(), E = Functions.end(); I != E; ++I) (*I)->collectLineCounts(FI); FI.print(); @@ -155,7 +155,7 @@ bool GCOVFunction::read(GCOVBuffer &Buff, GCOV::GCOVFormat Format) { /// dump - Dump GCOVFunction content on standard out for debugging purposes. void GCOVFunction::dump() { outs() << "===== " << Name << " @ " << Filename << ":" << LineNumber << "\n"; - for (SmallVector<GCOVBlock *, 16>::iterator I = Blocks.begin(), + for (SmallVectorImpl<GCOVBlock *>::iterator I = Blocks.begin(), E = Blocks.end(); I != E; ++I) (*I)->dump(); } @@ -163,7 +163,7 @@ void GCOVFunction::dump() { /// collectLineCounts - Collect line counts. This must be used after /// reading .gcno and .gcda files. void GCOVFunction::collectLineCounts(FileInfo &FI) { - for (SmallVector<GCOVBlock *, 16>::iterator I = Blocks.begin(), + for (SmallVectorImpl<GCOVBlock *>::iterator I = Blocks.begin(), E = Blocks.end(); I != E; ++I) (*I)->collectLineCounts(FI); } @@ -197,7 +197,7 @@ void GCOVBlock::dump() { outs() << "Block : " << Number << " Counter : " << Counter << "\n"; if (!Edges.empty()) { outs() << "\tEdges : "; - for (SmallVector<uint32_t, 16>::iterator I = Edges.begin(), E = Edges.end(); + for (SmallVectorImpl<uint32_t>::iterator I = Edges.begin(), E = Edges.end(); I != E; ++I) outs() << (*I) << ","; outs() << "\n"; @@ -220,14 +220,14 @@ void GCOVBlock::dump() { /// reading .gcno and .gcda files. void GCOVLines::collectLineCounts(FileInfo &FI, StringRef Filename, uint32_t Count) { - for (SmallVector<uint32_t, 16>::iterator I = Lines.begin(), + for (SmallVectorImpl<uint32_t>::iterator I = Lines.begin(), E = Lines.end(); I != E; ++I) FI.addLineCount(Filename, *I, Count); } /// dump - Dump GCOVLines content on standard out for debugging purposes. void GCOVLines::dump() { - for (SmallVector<uint32_t, 16>::iterator I = Lines.begin(), + for (SmallVectorImpl<uint32_t>::iterator I = Lines.begin(), E = Lines.end(); I != E; ++I) outs() << (*I) << ","; } |