diff options
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/include/clang/CodeGen/CodeGenABITypes.h | 9 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CodeGenABITypes.cpp | 6 |
2 files changed, 4 insertions, 11 deletions
diff --git a/clang/include/clang/CodeGen/CodeGenABITypes.h b/clang/include/clang/CodeGen/CodeGenABITypes.h index 2557f9c8e6f..455ad745844 100644 --- a/clang/include/clang/CodeGen/CodeGenABITypes.h +++ b/clang/include/clang/CodeGen/CodeGenABITypes.h @@ -52,7 +52,6 @@ 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. @@ -75,12 +74,12 @@ private: /// 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 diff --git a/clang/lib/CodeGen/CodeGenABITypes.cpp b/clang/lib/CodeGen/CodeGenABITypes.cpp index 5305a29011a..b673fc24717 100644 --- a/clang/lib/CodeGen/CodeGenABITypes.cpp +++ b/clang/lib/CodeGen/CodeGenABITypes.cpp @@ -33,12 +33,6 @@ CodeGenABITypes::CodeGenABITypes(ASTContext &C, llvm::Module &M, 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) { |

