Questions about Clang's API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Questions about Clang's API

Hans Wennborg via cfe-dev
Hi:
I'm relatively new to the libClang API. Below are a few questions I have:
- I'm currently using ClangTool's ::buildASTs to construct AST from CompilationDatabase. Is there any API to do this in parallel to speed up this process?
- From previous step I can obtain an array of ASTUnit. AFAIK I should then get the ASTContext of this ASTUnit then call ASTContext::getTranslationUnitDecl() , my question is what is the next step to run my RecursiveASTVisitor on it?
- My third question is that is Clang's APIs generally thread-safe? As in can I safely do step 2 across multiple threads given that I dont share ASTContext among threads?

Zhang


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev