[cfe-dev] libtooling ClangTool::run question for EmitLLVMOnlyAction

Adrian Ortega elfus0.1 at gmail.com
Sun Aug 17 12:55:59 PDT 2014


Thanks for confirming my suspicious... hopefully no unforeseen problems 
arise while I do that:)

Regards

On 17/08/14 14:19, Manuel Klimek wrote:
> You can write your own FronendActionFactory, and then you have total 
> control over the Action you create and what you want to do with it. I 
> have never done anything with llvm::Modules, so unforeseen problems 
> might arise ;)
>
> On Sat Aug 16 2014 at 1:01:56 AM Adrian Ortega <elfus0.1 at gmail.com 
> <mailto:elfus0.1 at gmail.com>> wrote:
>
>     Hello,
>
>     I am trying to run an EmitLLVMOnlyAction using libtooling. I am
>     following this webpage
>     http://llvm.org/releases/3.4/tools/clang/docs/LibTooling.html
>
>     And it actually works, but what I'm trying to do next is to get the
>     llvm::Module by using the llvm::CodeGenAction::takeModule() method. I
>     took a quick look at the code, and seems that for every
>     translation unit
>     a different FrontendAction (EmitLLVMOnlyAction).
>
>     The question is:
>     Is there a way to get a pointer to that FrontendAction
>     (EmitLLVMOnlyAction) created by ClangTool so I can play with the
>     llvm::Modules?
>     _______________________________________________
>     cfe-dev mailing list
>     cfe-dev at cs.uiuc.edu <mailto:cfe-dev at cs.uiuc.edu>
>     http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140817/c31713bd/attachment.html>


More information about the cfe-dev mailing list