Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] The best way to create IASTTranslationUnit

Thank you.
Could you please clarify that AST_SKIP_INDEXED_HEADERS since it is not
very clear for me.
I did understand that headers will be pulled from index. At the same
time (as I undestand, maybe wrongly) index contains just subset of the
whole AST information.
Am I right that I could loose some useful info (I'm mostly wondering
about macros) ?
What will happen with perfromance if I use zero for second argument of
getAST? Will it ignore index (except parser configuration)?


2008/10/14 Schorn, Markus <Markus.Schorn@xxxxxxxxxxxxx>:
> I recommend to create the AST using ITranslationUnit.getAST(IIndex, int
> style).
> Doing that the parser will pick up the same configuration as the indexer
> would.
> With the 'style' argument you can choose to skip indexed-headers in
> which case
> they are pulled in from the index (style AST_SKIP_INDEXED_HEADERS).
> Markus.
>> -----Original Message-----
>> From: cdt-dev-bounces@xxxxxxxxxxx
>> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Dmitry Smirnov
>> Sent: Tuesday, October 14, 2008 2:36 PM
>> To: CDT General developers list.
>> Subject: [cdt-dev] The best way to create IASTTranslationUnit
>> Importance: Low
>> Hi,
>> I'm wondering what is the best way to create the
>> IASTTranslationUnit from performance perspective?
>> When I create it with
>>  CCorePlugin.getDefault().getDOM().getTranslationUnit(file,
>> false); it takes up to few seconds.
>> At the same time, it seems I do not use the index at all
>> though my project has the index. Is it possible to use it for
>> AST? Will it speed up the ASTTranslationUnit creation process?
>> Dmitry
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx

Back to the top