public:
CodeGenABITypes(ASTContext &C, llvm::Module &M,
CoverageSourceInfo *CoverageInfo = nullptr);
- ~CodeGenABITypes();
/// These methods all forward to methods in the private implementation class
/// CodeGenTypes.
/// Default CodeGenOptions object used to initialize the
/// CodeGenModule and otherwise not used. More specifically, it is
/// not used in ABI type generation, so none of the options matter.
- CodeGenOptions *CGO;
- HeaderSearchOptions *HSO;
- PreprocessorOptions *PPO;
+ std::unique_ptr<CodeGenOptions> CGO;
+ std::unique_ptr<HeaderSearchOptions> HSO;
+ 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
CGM(new CodeGen::CodeGenModule(C, *HSO, *PPO, *CGO, M, C.getDiagnostics(),
CoverageInfo)) {}
-CodeGenABITypes::~CodeGenABITypes()
-{
- delete CGO;
- delete CGM;
-}
-
const CGFunctionInfo &
CodeGenABITypes::arrangeObjCMessageSendSignature(const ObjCMethodDecl *MD,
QualType receiverType) {