[llvm-commits] [llvm] r113374 - in /llvm/trunk: include/llvm/LLVMContext.h lib/VMCore/LLVMContext.cpp lib/VMCore/LLVMContextImpl.cpp lib/VMCore/LLVMContextImpl.h lib/VMCore/Module.cpp

Chris Lattner clattner at apple.com
Wed Sep 8 11:07:27 PDT 2010


On Sep 8, 2010, at 11:03 AM, Owen Anderson wrote:

> Author: resistor
> Date: Wed Sep  8 13:03:32 2010
> New Revision: 113374
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=113374&view=rev
> Log:
> Clarify the ownership model of LLVMContext and Module. Namely, contexts own
> modules are instantiated in them.  If the context is deleted, all of its owned
> modules are also deleted.

Nice!  Please make add/removeModule private members of LLVMContext (friend'ing Module) so that other clients of LLVMContext don't worry about them.  Alternatively, maybe it is better to put add/removeModule on LLVMContextImpl since Module can see it, then it would be really clearly an implementation detail.   Thanks Owen,

-Chris





More information about the llvm-commits mailing list