diff options
| author | Alp Toker <alp@nuanti.com> | 2013-12-28 21:58:40 +0000 |
|---|---|---|
| committer | Alp Toker <alp@nuanti.com> | 2013-12-28 21:58:40 +0000 |
| commit | f47bcae03ece9015a079a7afac7fe5b205fee343 (patch) | |
| tree | 5079c509e02a8b312a723037b3dc37218f622d67 /lib/CodeGen/CodeGenModule.h | |
| parent | bd62d2f34949149b658700ca31dcd9a4430cc6eb (diff) | |
| download | clang-f47bcae03ece9015a079a7afac7fe5b205fee343.tar.gz clang-f47bcae03ece9015a079a7afac7fe5b205fee343.tar.bz2 clang-f47bcae03ece9015a079a7afac7fe5b205fee343.tar.xz | |
Tidy up CGCXXABI creation
'create' functions conventionally return a pointer, not a reference.
Also use an OwningPtr to get replace the delete of a reference member.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198126 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
| -rw-r--r-- | lib/CodeGen/CodeGenModule.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index b02f0178d9..5f26ab968c 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -236,7 +236,7 @@ class CodeGenModule : public CodeGenTypeCache { DiagnosticsEngine &Diags; const llvm::DataLayout &TheDataLayout; const TargetInfo &Target; - CGCXXABI &ABI; + llvm::OwningPtr<CGCXXABI> ABI; llvm::LLVMContext &VMContext; CodeGenTBAA *TBAA; @@ -535,7 +535,7 @@ public: DiagnosticsEngine &getDiags() const { return Diags; } const llvm::DataLayout &getDataLayout() const { return TheDataLayout; } const TargetInfo &getTarget() const { return Target; } - CGCXXABI &getCXXABI() { return ABI; } + CGCXXABI &getCXXABI() const { return *ABI; } llvm::LLVMContext &getLLVMContext() { return VMContext; } bool shouldUseTBAA() const { return TBAA != 0; } |
