search for: llvmbuildmalloc

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

2011 Jul 18
0
[LLVMdev] llvmbuildmalloc/llvmbuildarraymalloc
I can't seem to use either LLVMBuildMalloc or LLVMBuildArrayMalloc without getting an IMA How am I supposed to create a global array? I can create locals no problem and global vars using LLVMAddGlobal though I'm stumped on the arrays. -- Andrew Ferguson
2020 Apr 15
2
question on the signature of malloc
Hi all, consider the following function from Core.cpp in LLVM 9.0.0: LLVMValueRef LLVMBuildMalloc(LLVMBuilderRef B, LLVMTypeRef Ty, const char *Name) { Type* ITy = Type::getInt32Ty(unwrap(B)->GetInsertBlock()->getContext()); Constant* AllocSize = ConstantExpr::getSizeOf(unwrap(Ty)); AllocSize = ConstantExpr::getTruncOrBitCast(AllocSize, ITy); Instructi...