Dobby HouseElf via llvm-dev
2021-Jul-13 20:47 UTC
[llvm-dev] How to use clang::tooling::Transformer?
Hello everyone, I am looking into source-to-source translation with LLVM. I found a tutorial but it looks out-of-date (~7 years old) - https://eli.thegreenplace.net/2014/05/01/modern-source-to-source-transformation-with-clang-and-libtooling/ One of the latest answers regarding the same topic in this mailing pointed to 'Transformer' class. The 'RewriteRule' looks similar to ASTMatcher, except the 'changeTo' part - which is static - can it be made dynamic? (different replacement for each match). I couldn't understand how to construct 'ChangeConsumer' object to instantiate a 'Transformer'-based tool.I couldn't find any example or tutorial on how to use this interface with a stand-alone tool. Any pointer to documentation? Thanks in advance! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210713/47a13511/attachment.html>