Displaying 1 result from an estimated 1 matches for "teststructpoint".
Did you mean:
teststructpointer
2016 May 17
2
Function arguments pass by value or by reference.
...irst operand is the same as the
operation with call instruction.
How can I get the function pointer properly?
Q2. Function arguments can be passed by value or by pointer in
C-programming language.
int arr[10];
struct node {
int a;
int att[10];
double ul;
};
struct node Node;
testStruct(Node);
testStructPointer(&Node);
After compiled and change it to .ll file, it looks like this:
call void @testStruct(%struct.node* byval align 8 @Node), !dbg !160
call void @testStructPointer(%struct.node* @Node), !dbg !161
You can see that function named testStruction's parameter is passed by
value while the...