F van der Meeren
2010-Sep-07 19:25 UTC
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
That won't work when you are trying to limit yourself to C and only C. Is there an LLVM-C alternative? Filip On 07 Sep 2010, at 20:37, Eric Christopher wrote:> > 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
Eric Christopher
2010-Sep-07 20:08 UTC
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
On Sep 7, 2010, at 12:25 PM, F van der Meeren wrote:> That won't work when you are trying to limit yourself to C and only C. > Is there an LLVM-C alternative?Hmm... If there isn't then we can easily expand the C bindings to do it. -eric
F van der Meeren
2010-Sep-07 20:16 UTC
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
As far as I know, there isn't a C way to do the job (llvm 2.7). But still, the system should recognize my method/prototype and act on it. Since the methods are unique by name alone and you can't have 2 globals with the same name in a module... Or is my logic completely unfounded ? Filip On 07 Sep 2010, at 22:08, Eric Christopher wrote:> > On Sep 7, 2010, at 12:25 PM, F van der Meeren wrote: > >> That won't work when you are trying to limit yourself to C and only C. >> Is there an LLVM-C alternative? > > Hmm... If there isn't then we can easily expand the C bindings to do it. > > -eric
Possibly Parallel Threads
- [LLVMdev] Intrinsic prototype has incorrect number of arguments!
- [LLVMdev] Intrinsic prototype has incorrect number of arguments!
- [LLVMdev] Intrinsic prototype has incorrect number of arguments!
- [LLVMdev] Intrinsic prototype has incorrect number of arguments!
- [LLVMdev] Intrinsic prototype has incorrect number of arguments!