From ad89ec013f5f9d99fc436723153f00123e9a8ebe Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 21 Jan 2009 07:43:11 +0000 Subject: Add a bit to IdentifierInfo that acts as a simple predicate which tells us whether Preprocessor::HandleIdentifier needs to be called. Because this method is only rarely needed, this saves a call and a bunch of random checks. This drops the time in HandleIdentifier from 3.52ms to .98ms on cocoa.h on my machine. llvm-svn: 62675 --- clang/lib/Basic/IdentifierTable.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Basic/IdentifierTable.cpp') diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp index d7ef915dab7..304c7a9b42f 100644 --- a/clang/lib/Basic/IdentifierTable.cpp +++ b/clang/lib/Basic/IdentifierTable.cpp @@ -32,6 +32,7 @@ IdentifierInfo::IdentifierInfo() { IsExtension = false; IsPoisoned = false; IsCPPOperatorKeyword = false; + NeedsHandleIdentifier = false; FETokenInfo = 0; Entry = 0; } -- cgit v1.2.3