[LLVMdev] Identifying classes and its member functions
dblaikie at gmail.com
Wed Jul 6 21:17:30 PDT 2011
> On looking into the IR (dumped out in human readable format), I see that
> the class defined in the source code has been stripped out of its member
> functions and only a structure containing the member variables is created.
> The member functions are written out separately with their mangled names.
> Hence, I suspect if it is possible to iterate over only the member functions
> of a particular class.
Indeed, as you've seen (& so far as I know), LLVM IR is too low level for
your task - there are no member functions at this level, they've all been
transformed into free functions and structs.
What kind of optimization were you hoping to implement based on this
If you aren't trying to implement an optimization, but instead try to
process source code in some way (indexing, source to source transformations,
etc) then you might want to use clang instead.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev