search for: testllvmstructfunccall

Displaying 1 result from an estimated 1 matches for "testllvmstructfunccall".

2011 Jun 20
3
[LLVMdev] C struct as function argument
I've been working on a wrapper for LLVM's C++ API to use from Objective-C for a scripting language I'm working on. I currently have an issue with passing arguments to a function that takes a struct argument. typedef struct _test_struct { int x; int y; } test_struct; id testLLVMStructFuncCall(test_struct x) { NSLog(@"%d %d",x.x,x.y); return N(x.x + x.y); } -(void) testLLVMStructFuncCall { CGKModule* myMod = [CGKModule moduleWithName:@"llvm_structfunccall_test"]; CGKType* testStructType = [CGKType structTypeWithElementTypes:[NSArray arrayWithObjects:[...