Undo the unique_ptr'fication of CodeGenABITypes::CGM introduced in r248762.

include/clang/CodeGenABITypes.h is in meant to be included by external
users, but using a unique_ptr on the private CodeGenModule introduces a
dependency on the type definition that prevents such a use.

NFC

llvm-svn: 249328
This commit is contained in:
Adrian Prantl 2015-10-05 17:41:16 +00:00
parent 0591c5d719
commit 83fde4bfc1
2 changed files with 7 additions and 1 deletions

View File

@ -52,6 +52,7 @@ class CodeGenABITypes
public:
CodeGenABITypes(ASTContext &C, llvm::Module &M,
CoverageSourceInfo *CoverageInfo = nullptr);
~CodeGenABITypes();
/// These methods all forward to methods in the private implementation class
/// CodeGenTypes.
@ -79,7 +80,7 @@ private:
std::unique_ptr<PreprocessorOptions> PPO;
/// The CodeGenModule we use get to the CodeGenTypes object.
std::unique_ptr<CodeGen::CodeGenModule> CGM;
CodeGen::CodeGenModule *CGM;
};
} // end namespace CodeGen

View File

@ -33,6 +33,11 @@ CodeGenABITypes::CodeGenABITypes(ASTContext &C, llvm::Module &M,
CGM(new CodeGen::CodeGenModule(C, *HSO, *PPO, *CGO, M, C.getDiagnostics(),
CoverageInfo)) {}
CodeGenABITypes::~CodeGenABITypes()
{
delete CGM;
}
const CGFunctionInfo &
CodeGenABITypes::arrangeObjCMessageSendSignature(const ObjCMethodDecl *MD,
QualType receiverType) {