search for: llvm_structfunccall_test

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

2011 Jun 20
3
[LLVMdev] C struct as function argument
...n 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:[CGKType intTypeWith32Bits],[CGKType intTypeWith32Bits],nil]]; CGKFunction* lfunc = [CGKFunction functionWithName:@"testLLVMStructFuncCall" types:[NSArray arrayWithObjects:[CGKType idTy...