Re-introduce the unique_ptr removed in r249328 and just make

~CodeGenABITypes out-of-line, which should have the same effect.

Thanks to David Blaikie for pointing this out!

llvm-svn: 249336
This commit is contained in:
Adrian Prantl 2015-10-05 18:54:30 +00:00
parent 225d3ab801
commit 9641ae3746
2 changed files with 4 additions and 5 deletions

View File

@ -80,7 +80,7 @@ private:
std::unique_ptr<PreprocessorOptions> PPO;
/// The CodeGenModule we use get to the CodeGenTypes object.
CodeGen::CodeGenModule *CGM;
std::unique_ptr<CodeGen::CodeGenModule> CGM;
};
} // end namespace CodeGen

View File

@ -33,10 +33,9 @@ CodeGenABITypes::CodeGenABITypes(ASTContext &C, llvm::Module &M,
CGM(new CodeGen::CodeGenModule(C, *HSO, *PPO, *CGO, M, C.getDiagnostics(),
CoverageInfo)) {}
CodeGenABITypes::~CodeGenABITypes()
{
delete CGM;
}
// Explicitly out-of-line because ~CodeGenModule() is private but
// CodeGenABITypes.h is part of clang's API.
CodeGenABITypes::~CodeGenABITypes() = default;
const CGFunctionInfo &
CodeGenABITypes::arrangeObjCMessageSendSignature(const ObjCMethodDecl *MD,