[cfe-dev] 'recording' program execution w/clang

Chris Lattner clattner at apple.com
Tue Nov 4 00:38:10 PST 2008


On Nov 3, 2008, at 3:51 PM, Edward Peschko wrote:

> All,
>
> I had a question with regards to clang - ie whether or not it was
> suited for the following.
>
> Right now, I have a very, very hackish set of perl modules which
> instrument my c and c++ code with tracing code, per step via macros.
> ie: I start out with -

Hi Edward,

Is there a specific reason that you want to do this at the source  
level?  This sort of thing may be easier to do at the LLVM IR level.   
There are several examples of this sort of thing in the lib/transforms/ 
instrumentation directory in LLVM,

If you really have to do this at the source level, I believe Clang can  
support it, but doing it at the LLVM IR level would give support for C+ 
+ today as well as a number of other languages supported by llvm-gcc.

-Chris



More information about the cfe-dev mailing list