Author: adrian Date: Mon Oct 5 13:54:30 2015 New Revision: 249336 URL: http://llvm.org/viewvc/llvm-project?rev=249336&view=rev Log: 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! Modified: cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp Modified: cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h?rev=249336&r1=249335&r2=249336&view=diff ============================================================================== --- cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h (original) +++ cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h Mon Oct 5 13:54:30 2015 @@ -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 Modified: cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp?rev=249336&r1=249335&r2=249336&view=diff ============================================================================== --- cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp (original) +++ cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp Mon Oct 5 13:54:30 2015 @@ -33,10 +33,9 @@ CodeGenABITypes::CodeGenABITypes(ASTCont 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, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits