diff options
| author | Craig Topper <craig.topper@gmail.com> | 2013-07-04 03:08:24 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2013-07-04 03:08:24 +0000 |
| commit | 2341c0d3b2aedbb090c3769dc44b3c403d46f9e9 (patch) | |
| tree | 8fdfccfc9bc4eadda9498ef660b36f06dc75040f /clang/lib/Serialization | |
| parent | a42fb525e43ba27f82d361236d47811b3d1073de (diff) | |
| download | bcm5719-llvm-2341c0d3b2aedbb090c3769dc44b3c403d46f9e9.tar.gz bcm5719-llvm-2341c0d3b2aedbb090c3769dc44b3c403d46f9e9.zip | |
Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.
llvm-svn: 185610
Diffstat (limited to 'clang/lib/Serialization')
| -rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index bf01e9c2f27..b9061ad7562 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -3120,7 +3120,7 @@ public: // Only emit declarations that aren't from a chained PCH, though. SmallVector<Decl *, 16> Decls(IdResolver.begin(II), IdResolver.end()); - for (SmallVector<Decl *, 16>::reverse_iterator D = Decls.rbegin(), + for (SmallVectorImpl<Decl *>::reverse_iterator D = Decls.rbegin(), DEnd = Decls.rend(); D != DEnd; ++D) clang::io::Emit32(Out, Writer.getDeclID(getMostRecentLocalDecl(*D))); @@ -4022,7 +4022,7 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, // Make sure visible decls, added to DeclContexts previously loaded from // an AST file, are registered for serialization. - for (SmallVector<const Decl *, 16>::iterator + for (SmallVectorImpl<const Decl *>::iterator I = UpdatingVisibleDecls.begin(), E = UpdatingVisibleDecls.end(); I != E; ++I) { GetDeclRef(*I); @@ -4296,8 +4296,8 @@ void ASTWriter::WriteDeclReplacementsBlock() { return; RecordData Record; - for (SmallVector<ReplacedDeclInfo, 16>::iterator - I = ReplacedDecls.begin(), E = ReplacedDecls.end(); I != E; ++I) { + for (SmallVectorImpl<ReplacedDeclInfo>::iterator + I = ReplacedDecls.begin(), E = ReplacedDecls.end(); I != E; ++I) { Record.push_back(I->ID); Record.push_back(I->Offset); Record.push_back(I->Loc); |

