[LLVMdev] Problem in Adding a pass to LLVM

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


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 
/home/ambika/llvm1/llvm-obj/Release/lib/libLLVMipa.a(ProfileAlias.o): In 
function `llvm::Pass* llvm::callDefaultCtor<ProfileAlias>()':
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.


More information about the llvm-dev mailing list