diff options
| author | Adrian Prantl <aprantl@apple.com> | 2015-10-05 18:54:30 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2015-10-05 18:54:30 +0000 |
| commit | 9641ae3746ac8ab1543a9f491a8bbb6c0831d333 (patch) | |
| tree | 214797bd4d6bf3fca2bb7a0e85213cb147df7324 | |
| parent | 225d3ab80191b1b11cff6cf1e9f86349621ed42c (diff) | |
| download | bcm5719-llvm-9641ae3746ac8ab1543a9f491a8bbb6c0831d333.tar.gz bcm5719-llvm-9641ae3746ac8ab1543a9f491a8bbb6c0831d333.zip | |
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
| -rw-r--r-- | clang/include/clang/CodeGen/CodeGenABITypes.h | 2 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CodeGenABITypes.cpp | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/clang/include/clang/CodeGen/CodeGenABITypes.h b/clang/include/clang/CodeGen/CodeGenABITypes.h index 25b8ef154af..d3a3a9b9ca0 100644 --- a/clang/include/clang/CodeGen/CodeGenABITypes.h +++ b/clang/include/clang/CodeGen/CodeGenABITypes.h @@ -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 diff --git a/clang/lib/CodeGen/CodeGenABITypes.cpp b/clang/lib/CodeGen/CodeGenABITypes.cpp index b892f070b51..420b958ba70 100644 --- a/clang/lib/CodeGen/CodeGenABITypes.cpp +++ b/clang/lib/CodeGen/CodeGenABITypes.cpp @@ -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, |

