Hi all I am trying hello pass in llvm. I have compiled and could generate LLVMHello.so but while giving the pass using opt i am getting below mentioned error. Command used: *opt-2.8 -load ../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so -hello < hello.bc* Error opening '../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so': ../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so: undefined symbol: _ZN4llvm12PassRegistry12registerPassERKNS_8PassInfoEb -load request ignored. opt-2.8: Unknown command line argument '-hello'. Try: 'opt-2.8 -help' -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110502/7ac3fad1/attachment.html>
Hi, 2011/5/2 Manish Gupta <mgupta.iitr at gmail.com>> Hi all > I am trying hello pass in llvm. I have compiled and could generate > LLVMHello.so but while giving the pass using opt i am getting below > mentioned error. > > Command used: *opt-2.8 -load > ../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so -hello < hello.bc > * >try instead debug realise also you should invoke an option for this pass try -hello or -hello2 after loading your pass> > Error opening '../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so': > ../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so: undefined symbol: > _ZN4llvm12PassRegistry12registerPassERKNS_8PassInfoEb > -load request ignored. > opt-2.8: Unknown command line argument '-hello'. Try: 'opt-2.8 -help' > > > > _______________________________________________ > 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/20110502/4194f033/attachment.html>
On 5/2/11 2:40 PM, Manish Gupta wrote:> Hi all > I am trying hello pass in llvm. I have compiled and could generate > LLVMHello.so but while giving the pass using opt i am getting below > mentioned error. > > Command used: *opt-2.8 -load > ../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so -hello < > hello.bc* > > Error opening > '../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so': > ../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so: undefined > symbol: _ZN4llvm12PassRegistry12registerPassERKNS_8PassInfoEb > -load request ignored. > opt-2.8: Unknown command line argument '-hello'. Try: 'opt-2.8 -help'From the looks of it, you are using a version of opt from LLVM 2.8 to run a pass compiled as part of LLVM 2.9. Is this correct? Since LLVM's internal API changes from release to release, you cannot use older passes with newer versions of LLVM (or vice-versa). If you are using LLVM 2.8, then your pass must be compiled using the LLVM 2.8 source code. If you are using LLVM 2.9, your pass must be compiled using the LLVM 2.9 source code. -- John T.> > > > _______________________________________________ > 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/20110502/263dfdc0/attachment.html>