]> granicus.if.org Git - clang/commitdiff
Switch from SmallVector to TinyPtrVector for the list of attributes on a declaration...
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 16 May 2016 22:53:19 +0000 (22:53 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 16 May 2016 22:53:19 +0000 (22:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269717 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/AttrIterator.h

index a0c803096af86fa9bf25c21796d4eecfedf33292..b768e5636a2720eb1180e2f726a30f7d2c5f5659 100644 (file)
@@ -15,6 +15,7 @@
 #define LLVM_CLANG_AST_ATTRITERATOR_H
 
 #include "clang/Basic/LLVM.h"
+#include "llvm/ADT/TinyPtrVector.h"
 #include <iterator>
 
 namespace clang {
@@ -39,8 +40,8 @@ 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<Attr*, 2> AttrVec;
-typedef SmallVector<const Attr*, 2> ConstAttrVec;
+typedef llvm::TinyPtrVector<Attr*> AttrVec;
+typedef llvm::TinyPtrVector<const Attr*> ConstAttrVec;
 
 /// specific_attr_iterator - Iterates over a subrange of an AttrVec, only
 /// providing attributes that are of a specific type.