From 5d7cb14e4beeb4b742fd5c117e47e95c0b0bad1d Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 16 Aug 2016 14:48:39 +0000 Subject: [PATCH] Reduce the number of allocations required for AST attributes. In test cases, the max resident memory changed from 65760k to 64476k which is 1.9% improvement. Allocations in grow_pod changed from 8847 to 4872 according to tcmalloc heap profiler. Overall running time remained the same. Patch by Eugene Kosov git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278812 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/AttrIterator.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/clang/AST/AttrIterator.h b/include/clang/AST/AttrIterator.h index a0c803096a..fb9b049e5d 100644 --- a/include/clang/AST/AttrIterator.h +++ b/include/clang/AST/AttrIterator.h @@ -39,8 +39,7 @@ void operator delete[](void *Ptr, const clang::ASTContext &C, size_t); namespace clang { /// AttrVec - A vector of Attr, which is how they are stored on the AST. -typedef SmallVector AttrVec; -typedef SmallVector ConstAttrVec; +typedef SmallVector AttrVec; /// specific_attr_iterator - Iterates over a subrange of an AttrVec, only /// providing attributes that are of a specific type. -- 2.40.0