search for: llvm_item_typ

Displaying 1 result from an estimated 1 matches for "llvm_item_typ".

Did you mean: llvm_item_type
2012 Mar 15
3
[LLVMdev] Using JIT code to code a program to call C++
...from LLVM. I know how to create StructTypes and add fields to them, but I don't have to have to parallel the C++ class layout -- that's tedious and error-prone. The idea I got was simply to add a char[sizeof(T)] as the only field to a StructType for a C++ class type: StructType *const llvm_item_type = StructType::create( llvm_ctx, "item" ); vector<Type*> llvm_struct_types; llvm_struct_types.push_back( ArrayType::get( IntegerType::get( llvm_ctx, 8 ), sizeof( item ) ) ); llvm_item_type->setBody( llvm_struct_types, false ); PointerType *const llvm_item_ptr_type = Point...