Moving tagging of '__experimental_modules_import' IdentifierInfo out of

IndentifierTable::get() and into IdentifierTable's constructor.

This gets a 0.7% reducing on lexing time for Cocoa.h, and
about the same for PCH generation.

llvm-svn: 151854
This commit is contained in:
Ted Kremenek 2012-03-01 22:53:32 +00:00
parent c4e5d0ccda
commit 9466603322
2 changed files with 4 additions and 5 deletions

View File

@ -460,11 +460,6 @@ public:
// contents.
II->Entry = &Entry;
// If this is the '__experimental_modules_import' contextual keyword,
// mark it as such.
if (Name.equals("__experimental_modules_import"))
II->setModulesImport(true);
return *II;
}

View File

@ -78,6 +78,10 @@ IdentifierTable::IdentifierTable(const LangOptions &LangOpts,
// Populate the identifier table with info about keywords for the current
// language.
AddKeywords(LangOpts);
// Add the '_experimental_modules_import' contextual keyword.
get("__experimental_modules_import").setModulesImport(true);
}
//===----------------------------------------------------------------------===//