[LLVMdev] Intrinsic prototype has incorrect number of arguments!

Eric Christopher echristo at apple.com
Tue Sep 7 11:37:33 PDT 2010


On Sep 7, 2010, at 11:30 AM, F van der Meeren wrote:

> 
> 
> Any ideas on what I am doing wrong here ?
> 


Why not just use something like:

        const Type *ArgPtr = Type::getInt8PtrTy(Context);
	const Type *IntPtr = getTargetData().getIntPtrType(Context); 

and then:

        const Type *ArgTypes[3] = {ArgPtr, ArgPtr, IntPtr };
	Intrinsic::getDeclaration(TheModule, Intrinsic::memcpy, ArgTypes, 3)

to get the type of memcpy? Trying to declare it that way is likely confusing to the system.

-eric



More information about the llvm-dev mailing list