[LLVMdev] Questions about deallocation responsibilities

Rodney M. Bates rodney_bates at lcwb.coop
Tue Dec 2 10:55:53 PST 2014


I am, from a front end, calling functions like LLVMModuleCreateWithName, found
in Core.h, ultimately calling LLVMWriteBitcodeToFile, found in BitWriter.h.

Do I correctly presume, from the existence of LLVMDisposeModule, that
I am responsible for calling it when I'm done?  Will I need to do deeper
disposing myself?  I presume at least I will need to free strings I allocated
myself, such as the module name I passed in.

What about, for example, llvm::DIBuilder::DICreateCompileUnit?  I haven't
been able so far to find a companion dispose for this object.


-- 
Rodney Bates
rodney.m.bates at acm.org



More information about the llvm-dev mailing list