[cfe-dev] macro-expanded/preprocessed string (clangLex) question

Sean Silva silvas at purdue.edu
Mon Jun 24 19:00:49 PDT 2013


On Mon, Jun 24, 2013 at 5:36 PM, Thompson, John <
John_Thompson at playstation.sony.com> wrote:

>  Sean,****
>
> ** **
>
> Why a map instead of just a vector?
>

Because the key operation (the "inner loop") is looking up macro expansions
(or preprocessor conditionals, or whatever) by their physical source
location and seeing if this expansion differs from any previously seen
expansions. The lookup by physical source location needs to be fast, hence
a map.


> ****
>
> ** **
>
> Why do you think it should be set up to do stuff in parallel with
> threads?  I’ve run the existing version over a fairly large group of
> headers and it just took a few seconds.
>

I never said it should be. All I said is that it was easy to see how to
parallelize it. However, most codebase-at-a-time tools will probably want
to take advantage of multicore someday, so it's a good thing to keep in
mind.

-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130624/8ffee075/attachment.html>


More information about the cfe-dev mailing list