<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 2, 2014 at 10:55 AM, Rodney M. Bates <span dir="ltr"><<a href="mailto:rodney_bates@lcwb.coop" target="_blank">rodney_bates@lcwb.coop</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am, from a front end, calling functions like LLVMModuleCreateWithName, found<br>
in Core.h, ultimately calling LLVMWriteBitcodeToFile, found in BitWriter.h.<br>
<br>
Do I correctly presume, from the existence of LLVMDisposeModule, that<br>
I am responsible for calling it when I'm done?  Will I need to do deeper<br>
disposing myself?  I presume at least I will need to free strings I allocated<br>
myself, such as the module name I passed in.<br>
<br>
What about, for example, llvm::DIBuilder::<u></u>DICreateCompileUnit?  I haven't<br>
been able so far to find a companion dispose for this object.</blockquote><div><br></div><div>Metadata is owned by the LLVMContext on construction. (except temporary metadata, which must be destroyed manually (there's a corresponding destroy function in llvm::MDNode) usually after RAUWing it with something else).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-- <br>
Rodney Bates<br>
<a href="mailto:rodney.m.bates@acm.org" target="_blank">rodney.m.bates@acm.org</a><br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</font></span></blockquote></div><br></div></div>