Use unique_ptr to own MCFunctions within MCModule.

MCModule's ctor had to be moved out of line so the definition of
MCFunction was available. (ctor requires the dtor of members (in case
the ctor throws) which required access to the dtor of MCFunction)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206244 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-04-15 05:15:19 +00:00
parent 570e52c6f1
commit ff2bf1bb8d
4 changed files with 14 additions and 14 deletions

View File

@ -73,7 +73,7 @@ class MCModule {
/// \name Function tracking
/// @{
typedef std::vector<MCFunction*> FunctionListTy;
typedef std::vector<std::unique_ptr<MCFunction>> FunctionListTy;
FunctionListTy Functions;
/// @}
@ -87,7 +87,7 @@ class MCModule {
friend class MCObjectDisassembler;
public:
MCModule() : Entrypoint(0) { }
MCModule();
~MCModule();
/// \name Create a new MCAtom covering the specified offset range.