search for: const_array

Displaying 5 results from an estimated 5 matches for "const_array".

2010 Feb 17
0
[LLVMdev] Incorrect execution of global constructor with JIT on ARM
...unsigned char arr[] = { 1, 2, 3, 4 }; > static const Global Constant(arr); > int main() { >  for (int i=0; i<4; i++) printf("%i", Constant.value[i]); > } Compiling with clang I got lots of errors, but boils down to two problems: > typedef unsigned char ArrayType[4]; const_array.cpp:3:2: error: type name does not allow storage class to be specified typedef unsigned char ArrayType[4]; ^ Which, as far as I can tell, it's confusing ArrayType[4] by a declaration of an unsigned char[4] type. I've changed your code slightly to make it compile with clang, but I haven&...
2010 Feb 15
2
[LLVMdev] Incorrect execution of global constructor with JIT on ARM
Hello, llvm developers! I am running LLVM with JIT on ARM. For simple programs it runs ok, but for lager code I have stumbled upon some issues. See following C++ code to which I have reduced the problem: #include <stdio.h> struct Global { typedef unsigned char ArrayType[4]; ArrayType value; Global(const ArrayType& arg) { for (int i = 0; i < 4; i++) this->value[i] =
2008 Mar 15
0
[LLVMdev] improving the ocaml binding's type safety
...up the type system for the concrete types GlobalVariable, Function, ConstantFP and ConstantInt; the abstract types GlobalValue, Value and Constant; and the functions set_value_name, linkage, declare_global, set_initializer, declare_function, entry_block, param, const_float, const_int, and const_array. That should be a reasonable survey. > We can't go letting haskell beat us now, can we? To truly compete with Bryan's Haskell bindings in terms of type safety, you'll need to go beyond preventing the cast macros in the C bindings from asserting and actually take over some of th...
2010 Feb 17
2
[LLVMdev] Incorrect codegen of getelementptr for ARM with JIT
...gt; static const Global Constant(arr); >> int main() { >> for (int i=0; i<4; i++) printf("%i", Constant.value[i]); >> } > > Compiling with clang I got lots of errors, but boils down to two problems: > >> typedef unsigned char ArrayType[4]; > > const_array.cpp:3:2: error: type name does not allow storage class to > be specified > typedef unsigned char ArrayType[4]; > ^ > > Which, as far as I can tell, it's confusing ArrayType[4] by a > declaration of an unsigned char[4] type. > > I've changed your code slightly to ma...
2008 Mar 15
4
[LLVMdev] improving the ocaml binding's type safety
I was talking to Gordon on #llvm earlier, and he challenged me with coming up with a way to improve the ocaml binding's type safety. We can't go letting haskell beat us now, can we? I think I got an easy solution with phantom types. For those who don't know what the problem is, the ocaml bindings share one type between whole class branches (like values). This means we need to downcast