[LLVMdev] Problem in Adding a pass to LLVM

ambika ambika at cse.iitb.ac.in
Tue Feb 2 11:16:24 PST 2010


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



More information about the llvm-dev mailing list