[LLVMdev] Sizeof a type?

Rick Mann rmann at latencyzero.com
Sat Jan 19 23:05:45 PST 2013


On Jan 19, 2013, at 22:32 , "Caldarale, Charles R" <Chuck.Caldarale at unisys.com> wrote:

> Look at the methods of the DataLayout class.

Thanks! I seem to be able to do this

    llvm::DataLayout* dl = new llvm::DataLayout(module());
    uint64_t myStructSuze = dl->getTypeStoreSize(myStructType);

Is that the correct usage?

-- 
Rick







More information about the llvm-dev mailing list