[cfe-dev] Questions about Clang's API

Zhang via cfe-dev cfe-dev at lists.llvm.org
Sun Jan 26 18:57:29 PST 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200127/fd2b2eef/attachment.html>


More information about the cfe-dev mailing list