[LLVMdev] Getting TargetData and TargetLibraryInfo for determining Malloc size

Arnamoy Bhattacharyya arnamoy at ualberta.ca
Tue Oct 29 04:02:29 PDT 2013


Hello;

I was trying to use the computeArraySize() function from the
MemoryBuiltins.cpp file.  It requires two arguments DataLayout *TD and
const TargetLibraryInfo *TLI.  Can anyone tell me how to get the
TargetLibraryInfo?  I am getting the DataLayout using:

DataLayout *TD;
TD = new DataLayout(&M);

I hope that's the right way of getting it.

Thanks a lot;
-- 
Arnamoy Bhattacharyya
Athabasca Hall 143
Department of Computing Science - University of Alberta
Edmonton, Alberta, Canada, T6G 2E8
587-710-7073



More information about the llvm-dev mailing list