when I have c code like
--- c code -------------
struct stest { /* deklariert den Strukturtyp person */
int age;
float weight;
} foo={44,67.2}; /* deklariert Variable des Typs person */
Yes, the C++ API LLVM IR “backend” is pretty verbose. It doesn’t use IRBuilder, which is the preferred IR generation interface these days.
However, the “load” in your example is required. All LLVM based compilers model user variables as objects in memory. In order to pass a variable to a function, you have to load it from memory first.