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 | 82862258e3208c5771f64b6a823d10400342ae68 (patch) | |
tree | a704d7b73d457f19ed9acb5fc4990d55605f6418 /clang/lib/CodeGen/CodeGenModule.h | |
parent | 3ca67d6404f6a6f0bec96014d75656de2c87e8cd (diff) | |
download | bcm5719-llvm-82862258e3208c5771f64b6a823d10400342ae68.tar.gz bcm5719-llvm-82862258e3208c5771f64b6a823d10400342ae68.zip |
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.
llvm-svn: 198126
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index b02f0178d93..5f26ab968c4 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/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; } |