[LLVMdev] Name of Function's original module during link-time optimization
bram.adams at ugent.be
Tue Sep 26 08:36:44 PDT 2006
Chris Lattner wrote:
> I'd suggest writing a little pass that strips out debug intrinsics.
OK, I did this and it works (the strange seg fault also disappears after
all declared debug variables are gone)! In a first phase, all intrinsic
instructions are discarded after extracting their data into annotations
attached to the relevant Function. Then, a second phase wipes out the
intrinsic instruction Functions themselves as well as all debug
variables in the declaration section. This 2-phase approach is necessary
as I implemented the pass as an InstVisitor.
A limitation here is that only Functions' debug data can be kept, as
other Values (i.e. Instructions) are not Annotable. Is this an explicit
GH-SEL, INTEC, Ghent University
PS: Could this pass be interesting to others? If so, I could send the
code to the list or to Bugzilla.
More information about the llvm-dev