[cfe-dev] Applying custom filters after preprocessing (and compile-time sprintf optimization)
Kazuho Oku
kazuhooku at gmail.com
Thu Oct 2 17:18:29 PDT 2014
Hi,
Recently I have started writing a preprocessor that wraps the C
preprocessor for optimizing calls to sprintf, since it is the one of the
bottlenecks of my application.
https://github.com/kazuho/qrintf
For GCC, it was easy for me to override the default C preprocessor, by
using its `-no-integrated-cpp` and `-wrapper` options (how I have done it
can be found in the `qrinf-gcc` and `qrintf-gcc-wrapper` files included in
the above repository).
However I have so far been unable to find a similar command-line option for
Clang. Is there any way to post-process the output of the preprocessor in
Clang? Or do I need to modify the source code of Clang itself?
Thank you in advance.
PS. BTW it would be great if compile-time optimization of sprintf goes into
Clang. Is there any chance of such possibility?
--
Kazuho Oku
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141003/ee2c1741/attachment.html>
More information about the cfe-dev
mailing list