link modules segfault

Hello everybody,

I'm trying to write a basic block pass linking the module to another module during the pass initialization.

Currently my pass initialization code looks like this:

http://paste.pocoo.org/show/r3fo6FSbE7jR2H5wDId6/

But now I'm getting a strange segmentation fault:

http://paste.pocoo.org/show/n3PImkRCyUWlsMPP9CGu/

Am I doing something wrong?

Best Regards
Andreas

Hi again,

I solved it. Actually it wasn't a segfault but a missing library.

The solution is to add the following line to you passes Makefile:

USEDLIBS = LLVMLinker.a

Hopefully that helps someone else who might run into a similar situation.

Cheers
Andreas