[LLVMdev] [RFC] LTO: deallocating llvm::Module inside lto_codegen_add_module

Duncan P. N. Exon Smith dexonsmith at apple.com
Wed Jan 22 14:05:35 PST 2014

On Jan 21, 2014, at 6:38 PM, Chandler Carruth <chandlerc at google.com> wrote:

> My 2 cents...
> On Tue, Jan 21, 2014 at 5:39 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> 1. Is this considered a change to the C API (and, thus, banned)?
> I think this would indeed be a significant semantic change to the C API.
> 2. Are there any consumers that rely on llvm::Module being accessible after
>    LTOCodeGenerator::addModule?  What about llvm::TargetMachine?
> I think we have to assume so. That's the down side to saying it is a stable C API.
> 3. Would the proposed behaviour be especially surprising?
> No, the behavior you describe seems sensible. I would just expect it to need to go under a separate/new API to preserve backwards compatibility.

Thanks Chandler.  I’ll go ahead with new API.

More information about the llvm-dev mailing list