[LLVMdev] How to add an include file

Eli Friedman eli.friedman at gmail.com
Sun Jul 5 14:48:16 PDT 2009


On Sun, Jul 5, 2009 at 1:16 PM, David Minor<dahvid.minor at gmail.com> wrote:
> I'm writing a code transformation that involves adding an include to
> existing code, adding a base class
> to and existing class and then linking with a previously compiled library.
> The main problem for me
> seems to be how can I add the include?  Can I compile the include alone to
> byte code and pre-pend it?
> Should I compile the library, which includes the include and parse out the
> include and pre-pend it?
> Am I missing something fundamental here?

If you want to add additional bitcode to an existing bitcode file, you
can link them together with llvm-link (or the equivalent C++ API
calls).  Beyond that, I'm not following what you're trying to do.

-Eli




More information about the llvm-dev mailing list