Hi, I am trying to add alias analysis in llvm. I created a file ProfileAlias.cpp in llvm source at the place where Andersens.cpp is there. ProfileAlias.cpp does nothing at present just empty definitions of required functions. When I build llvm I get the following error: /home/ambika/llvm1/llvm-obj/Release/lib/libLLVMipa.a(ProfileAlias.o): In function `llvm::createProfileAliasPass()': ProfileAlias.cpp:(.text+0x46): undefined reference to `vtable for ProfileAlias' /home/ambika/llvm1/llvm-obj/Release/lib/libLLVMipa.a(ProfileAlias.o): In function `llvm::Pass* llvm::callDefaultCtor<ProfileAlias>()': ProfileAlias.cpp:(.text._ZN4llvm15callDefaultCtorI12ProfileAliasEEPNS_4PassEv[llvm::Pass* llvm::callDefaultCtor<ProfileAlias>()]+0x26): undefined reference to `vtable for ProfileAlias' /usr/bin/ld: /home/ambika/llvm1/llvm-obj/Release/bin/opt: hidden symbol `vtable for ProfileAlias' isn't defined /usr/bin/ld: final link failed: Nonrepresentable section on output Can someone help me with this. regards, Ambika
Hi! On 02.02.2010, at 20:16, ambika wrote:> /home/ambika/llvm1/llvm-obj/Release/lib/ > libLLVMipa.a(ProfileAlias.o): In > function `llvm::createProfileAliasPass()': > ProfileAlias.cpp:(.text+0x46): undefined reference to `vtable for > ProfileAlias'http://gcc.gnu.org/faq.html#vtables Does that help? Andi
Well I have given empty bodies for all virtual functions but still I get the same error. I referred to http://llvm.org/docs/AliasAnalysis.html#writingnew and followed the steps but still cannot build llvm. regards, Ambika Andreas Neustifter wrote:> Hi! > > On 02.02.2010, at 20:16, ambika wrote: > >> /home/ambika/llvm1/llvm-obj/Release/lib/libLLVMipa.a(ProfileAlias.o): In >> function `llvm::createProfileAliasPass()': >> ProfileAlias.cpp:(.text+0x46): undefined reference to `vtable for >> ProfileAlias' > > http://gcc.gnu.org/faq.html#vtables > > Does that help? > > Andi
Well I have given empty bodies for all virtual functions but still I get the same error. I referred to http://llvm.org/docs/AliasAnalysis.html#writingnew and followed the steps but still cannot build llvm. regards, Ambika Andreas Neustifter wrote:> Hi! > > On 02.02.2010, at 20:16, ambika wrote: > >> /home/ambika/llvm1/llvm-obj/Release/lib/libLLVMipa.a(ProfileAlias.o): In >> function `llvm::createProfileAliasPass()': >> ProfileAlias.cpp:(.text+0x46): undefined reference to `vtable for >> ProfileAlias' > > http://gcc.gnu.org/faq.html#vtables > > Does that help? > > Andi
Seemingly Similar Threads
- [LLVMdev] Problem in Adding a pass to LLVM
- [LLVMdev] [Fwd: Can someone help me with error while i make my own pass]
- [LLVMdev] [Fwd: Can someone help me with error while i make my own pass]
- [LLVMdev] Using Profile Information
- [LLVMdev] A very basic doubt about LLVM Alias Analysis