[LLVMdev] Hello Pass Problem

John Criswell criswell at illinois.edu
Mon May 2 13:11:53 PDT 2011


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>


More information about the llvm-dev mailing list