search for: llvm_struct_types

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

2012 Mar 15
3
[LLVMdev] Using JIT code to code a program to call C++
...e 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 = PointerType::getUnqual( llvm_item_type ); I would think that, because it's a StructType, the...