search for: getsequentialelementtyp

Displaying 2 results from an estimated 2 matches for "getsequentialelementtyp".

2014 Jan 29
2
[LLVMdev] getelementptr on static const struct
Hi, I found a mysterious behavior of LLVM optimizer. I compiled the following code by clang -emit-llvm -S: #include <stddef.h> static const struct t {char t[4]; char s;} p = {{}, 'a'}; char f() { return ((char*)&p)[offsetof(struct t, s)]; } then I obtained the following LLVM IR: %struct.t = type { [4 x i8], i8 } @p = constant %struct.t { [4 x i8] zeroinitializer, i8 97
2016 Apr 17
2
Problems with GEP and CallInst
I got a little problems with strings (const char pointers). Global variables holding the string literal are declared correctly, but i have a problem when I pass this string to a function: it asserts with this message. Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"), function