[LLVMdev] opt refuses to load a pass

Pablo Barrio pbarrio at die.upm.es
Wed Jun 1 05:47:18 PDT 2011


Just in case someone reads this one, the problem is solved. For my pass, 
the whole LLVM had to be compiled with assertions enabled.

On 05/30/2011 06:24 PM, Pablo Barrio wrote:
> Hi,
>
> I'm having problems while using a custom pass with opt. The pass
> compiles and links just fine but, when I try to use it with opt:
>
> opt -load LLVMmyPass.so -my-flag -f aes.bc -o aes_bb.bc
>
> opt refuses to load it with the following error:
>
> Error opening 'LLVMmyPass.so': LLVMmyPass.so: undefined symbol:
> _ZN4llvm9DebugFlagE
>     -load request ignored.
>
> and then complains that the flag "-my-flag" cannot be found. A quick
> look at google makes me think that the missing symbol belongs to
> libLLVMSupport.a, which should be already linked to opt, shouldn't it?
> Somebody suggested me that perhaps LLVM and my pass were compiled with
> different options (one in Release and another in Debug, for instance)
> but I double-checked and both are in Debug mode.
>
> Can anyone spot the problem here? Thanks ahead!
>

-- 
Pablo Barrio
Dpto. Ing. Electrónica - E.T.S.I. Telecomunicación
Despacho C-203
Avda. Complutense s/n, 28040 Madrid
Tlf. 915495700 ext. 4234
@: pbarrio at die.upm.es




More information about the llvm-dev mailing list