Displaying 1 result from an estimated 1 matches for "fs2p1".
Did you mean:
f2p1
2015 Jan 20
2
[LLVMdev] Another struct-return question
For this C code:
typedef struct s2 {
char s2C1 , s2C2;
} s2td;
clang generates:
%struct.s2 = type { i8, i8 }
which I lets llvm decide on the actual layout of this type.
For the return statement in:
struct s2 fs2 ( char fs2p1 ) {
struct s2 ls2;
ls2.s2C1 = 'B';
ls2.s2C2 = fs2p1;
return ls2;
}
I see this IR:
%struct.s2 = type { i8, i8 }
define i16 @fs2(i8 signext %fs2p1) #0 {
entry:
%retval = alloca %struct.s2, align 1 ; [#uses=2 type=%struct.s2*...