search for: generic_ptr

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

2018 Mar 17
1
Migration from 3.8 to 6.0 questions (segfault most concerning)
I'm encountering a few problems in my migration that I haven't yet figured out. `getOrInsertFunction` is generating a SEGFAULT at FunctionType::isValidArgumentType(llvm::Type*).  I'm calling it as:     generic_ptr_ = llvm::PointerType::get( llvm::Type::getInt8Ty(context), 0 );     f_natural_int = llvm::IntegerType::get(context, 64);     module->getOrInsertFunction(         "count_malloc", generic_ptr, f_natural_int, (llvm::Type*)0 ); It appears there is no more Reloc::Default or CodeModel::Def...
2013 Feb 03
0
[LLVMdev] creating a variable structure, getting offset pointer
...the elements). T will be used opaquely (a pointer passed to func_ptr as the first parameter, the function then casts it to the correct pointer type). I currently achieve this by making my wrap structure like this: struct wrap: int32 ref_count PointerType(FunctionType) func_ptr PointerType(Int8) generic_ptr I then allocate a structure large enough for this base and type T. I then just assume T has the same address as "generic_ptr" and use CreateStructGEP to get at that address. However, depending on type T I'm not sure this will always create the correct alignment requirements. How can...