[LLVMdev] Name of Function's original module during link-time optimization

Bram Adams bram.adams at ugent.be
Sun Sep 24 13:58:08 PDT 2006


Hi,

During link-time optimization using llvm-ld, I occasionally need to  
find the name/ID of the original module/bytecode file a Function  
belonged to. In order to do this I added a nameOfPreviousModule- 
attribute to Function and some getters/setters (see attached patch).  
However, I can't find out how to read in the ModuleID of a Module  
during bytecode loading in lib/bytecode/Reader/Reader.cpp.

How can one do this? Is there another (better) way to accomplish what  
I intend to do here (without extra attribute e.g.)?

Kind regards,

Bram Adams
GH-SEL, INTEC, Ghent University (Belgium)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.modulename-1.8
Type: application/octet-stream
Size: 2202 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060924/5a3d40e1/attachment.obj>


More information about the llvm-dev mailing list