First, I customize a data structure:
typedef struct{
char name[10];
void* fp;
} test;
I created this data structure during the IR phase.
static StructType* Test_Type = llvm::StructType::create(C,"test");
Also, I create a structured array:
test my_test[10];
test* my_test_pointer = my_test;
Finally, I tried to access its elements through getelementptr and got the following error:
GEP into unsized type!
%1 = getelementptr %test, %test* %0, i32 0
What is the cause of this unsized Type? How do I resolve this error?
Any answer would be of great help to me. Thanks.