From: Benjamin Kramer Date: Sat, 12 Sep 2009 09:45:28 +0000 (+0000) Subject: SmallVectorize preprocessor's token cache. Testing shows there is almost never X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4d5eb4866a27d497f0bb75b12c2ffd48ad4d9c0;p=clang SmallVectorize preprocessor's token cache. Testing shows there is almost never more than one token in the cache. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81612 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index d1c508a542..0765ac391b 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -25,6 +25,7 @@ #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/OwningPtr.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/Support/Allocator.h" #include @@ -186,7 +187,7 @@ class Preprocessor { TokenLexer *TokenLexerCache[TokenLexerCacheSize]; private: // Cached tokens state. - typedef std::vector CachedTokensTy; + typedef llvm::SmallVector CachedTokensTy; /// CachedTokens - Cached tokens are stored here when we do backtracking or /// lookahead. They are "lexed" by the CachingLex() method.