[LLVMdev] How to add an include file

David Minor dahvid.minor at gmail.com
Tue Jul 7 23:14:43 PDT 2009


I see,
Adding includes is trivial even w/o llvm, but the real problem here is
manipulation of classes, if I understand you correctly adding an inheritee
wouldn't be possible.
David

On Tue, Jul 7, 2009 at 12:43 PM, Eli Friedman <eli.friedman at gmail.com>wrote:

> On Tue, Jul 7, 2009 at 1:42 AM, David Minor<dahvid.minor at gmail.com> wrote:
> > Hi Eli,
> > Let's say I have a file ClassA.h, that pairs with a file ClassA.cpp
> > to product a library libClassA.a.
> > ClassA.h contains the single declaration.
> >
> > class A {...};
> >
> > I want to transform it to:
> >
> > #include "ClassB.h"
> >
> > class A : public class B {...};
> >
> > ClassB.h is the header file for a library libClassB.a built from
> ClassB.cpp
> > and ClassB.h.
> > 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.
>
> You have to rebuild libClassA.a from scratch; the generation of
> bitcode makes too many hard-coded assumptions about the layout of
> classes to manipulate the bitcode accurately.
>
> -Eli
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090708/c6df31a8/attachment.html>


More information about the llvm-dev mailing list