Intrinsic

Hi,

I'm trying to use exception control by LLVM.
In the demo page, I got :

declare i8* @llvm.eh.exception() nounwind

But, when a try to emit the code by llvm engine, the name is generate with the sufix .132
( llvm.eh.exception.132 ) and the Function::getIntrinsicID abort the program.

It was so :

Intrinsic::getDeclaration(llvm_module,Intrinsic::memset,&Tys,1);

Now, it's running with this calling :

return cast<Function> llvm_module->getOrInsertFunction(std::string("llvm.eh.exception"),
                                                   Intrinsic::getType(Intrinsic::eh_exception, &Tys,1)) );

Is that correct?

Manoel Teixeira

Hi,

I'm trying to use exception control by LLVM.
In the demo page, I got :

declare i8* @llvm.eh.exception() nounwind

But, when a try to emit the code by llvm engine, the name is generate with the sufix .132
( llvm.eh.exception.132 ) and the Function::getIntrinsicID abort the program.

It was so :

Intrinsic::getDeclaration(llvm_module,Intrinsic::memset,&Tys,1);

Make sure that Tys[0] is set to Type::Int32Ty.

-Chris