[cfe-commits] r151854 - in /cfe/trunk: include/clang/Basic/IdentifierTable.h lib/Basic/IdentifierTable.cpp
Douglas Gregor
dgregor at apple.com
Mon Mar 5 20:43:40 PST 2012
On Mar 1, 2012, at 2:53 PM, Ted Kremenek wrote:
> Author: kremenek
> Date: Thu Mar 1 16:53:32 2012
> New Revision: 151854
>
> URL: http://llvm.org/viewvc/llvm-project?rev=151854&view=rev
> Log:
> 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.
Very nice!
- Doug
> Modified:
> cfe/trunk/include/clang/Basic/IdentifierTable.h
> cfe/trunk/lib/Basic/IdentifierTable.cpp
>
> Modified: cfe/trunk/include/clang/Basic/IdentifierTable.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/IdentifierTable.h?rev=151854&r1=151853&r2=151854&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/IdentifierTable.h (original)
> +++ cfe/trunk/include/clang/Basic/IdentifierTable.h Thu Mar 1 16:53:32 2012
> @@ -460,11 +460,6 @@
> // 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;
> }
>
>
> Modified: cfe/trunk/lib/Basic/IdentifierTable.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/IdentifierTable.cpp?rev=151854&r1=151853&r2=151854&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Basic/IdentifierTable.cpp (original)
> +++ cfe/trunk/lib/Basic/IdentifierTable.cpp Thu Mar 1 16:53:32 2012
> @@ -78,6 +78,10 @@
> // 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);
> }
>
> //===----------------------------------------------------------------------===//
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list