[LLVMdev] Sizeof a type?

Rick Mann rmann at latencyzero.com
Sat Jan 19 21:23:43 PST 2013


Is there a way to get the sizeof a type? Say I've created a struct type without any explicit attribtues, and I want to call malloc() to allocate space for it. Can I get the size as an llvm::Constant* (or other llvm::Value*) given an llvm::StructType* or other llvm::Type*?

TIA,

-- 
Rick







More information about the llvm-dev mailing list