<div dir="ltr">Hi Eli,<br>
Let's say I have a file ClassA.h, that pairs with a file ClassA.cpp<br>to product a library libClassA.a. <br>ClassA.h contains the single declaration.<br>
<br>
class A {...};<br>
<br>
I want to transform it to:<br>
<br>
#include "ClassB.h"<br>
<br>
class A : public class B {...};<br>
<br>
ClassB.h is the header file for a library libClassB.a built from ClassB.cpp and ClassB.h.<br>
I can clearly link libClassB with libClassA. But how
can I bring in the header file so that it's declarations will be known
in ClassA.h.  Remember this is happening during a pass.<br>
<br>
Thanks,<br>
David<br>
<br>
<br>
<br><br><div class="gmail_quote">On Mon, Jul 6, 2009 at 12:48 AM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div class="h5">On Sun, Jul 5, 2009 at 1:16 PM, David Minor<<a href="mailto:dahvid.minor@gmail.com">dahvid.minor@gmail.com</a>> wrote:<br>
> I'm writing a code transformation that involves adding an include to<br>
> existing code, adding a base class<br>
> to and existing class and then linking with a previously compiled library.<br>
> The main problem for me<br>
> seems to be how can I add the include?  Can I compile the include alone to<br>
> byte code and pre-pend it?<br>
> Should I compile the library, which includes the include and parse out the<br>
> include and pre-pend it?<br>
> Am I missing something fundamental here?<br>
<br>
</div></div>If you want to add additional bitcode to an existing bitcode file, you<br>
can link them together with llvm-link (or the equivalent C++ API<br>
calls).  Beyond that, I'm not following what you're trying to do.<br>
<br>
-Eli<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br><br></div>