[cfe-dev] RefactoringTool - set output file path?

David Blaikie dblaikie at gmail.com
Mon Mar 16 07:59:04 PDT 2015


On Sat, Mar 14, 2015 at 4:52 AM, Gabor Kozar <kozargabor at gmail.com> wrote:

>  I'm working on a clang tool that instruments source code.
>

Do you need to instrument the /source code/ in particular? The usual
approach with other instrumentation (sanitizers, code coverage, etc) is
just to instrument the resulting binary (by instrumenting the LLVM IR
generated by the frontend - usually during IR generation in the frontend
(Clang, most often)) rather than mutating the source (or generating a
mutated copy of the source) & then compiling that.

The refactoring tools are really focussed on the scenario of refactoring -
where you actually want to modify the original source. (not that they can't
be used for other things, just that they might not be the best tool for the
job)


> However, I can't seem to find any option to set the output file path, i.e.
> my tool will always modify the original file, which is not what I want.
>
> Was this a deliberate decision, or am I just missing something?
>
> ---
> Best regards,
>
> Gábor 'ShdNx' Kozár
> http://gaborkozar.me
>
>
>
> _______________________________________________
> cfe-dev mailing list
> 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/20150316/c3cd4603/attachment.html>


More information about the cfe-dev mailing list