From 3a874a405d1913b132e4ecfa52e22c4e2264b05d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 18 Jan 2009 02:52:26 +0000 Subject: [PATCH] Avoid malloc thrashing on the std::vector for ConditionalStack. Because there is one of these per header, this almost always gets alloc/free'd for each #ifdef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62451 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Lex/PreprocessorLexer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/clang/Lex/PreprocessorLexer.h b/include/clang/Lex/PreprocessorLexer.h index 3cf0f92b30..f98b559965 100644 --- a/include/clang/Lex/PreprocessorLexer.h +++ b/include/clang/Lex/PreprocessorLexer.h @@ -16,7 +16,7 @@ #include "clang/Lex/MultipleIncludeOpt.h" #include "clang/Lex/Token.h" -#include +#include "llvm/ADT/SmallVector.h" #include namespace clang { @@ -61,7 +61,7 @@ protected: /// ConditionalStack - Information about the set of #if/#ifdef/#ifndef blocks /// we are currently in. - std::vector ConditionalStack; + llvm::SmallVector ConditionalStack; PreprocessorLexer(const PreprocessorLexer&); // DO NOT IMPLEMENT void operator=(const PreprocessorLexer&); // DO NOT IMPLEMENT -- 2.40.0