diff options
author | Tyker <tyker1@outlook.com> | 2019-11-16 17:04:34 +0100 |
---|---|---|
committer | Tyker <tyker1@outlook.com> | 2019-11-16 17:56:09 +0100 |
commit | 08ea1ee2db5f9d6460fef1d79d0d1d1a5eb78982 (patch) | |
tree | 727588f22579140c098d5a56d37162fa6dd775c4 /clang/lib/CodeGen/CGExprConstant.cpp | |
parent | 423f541c1a322963cf482683fe9777ef0692082d (diff) | |
download | bcm5719-llvm-08ea1ee2db5f9d6460fef1d79d0d1d1a5eb78982.tar.gz bcm5719-llvm-08ea1ee2db5f9d6460fef1d79d0d1d1a5eb78982.zip |
[NFC] Refactor representation of materialized temporaries
Summary:
this patch refactor representation of materialized temporaries to prevent an issue raised by rsmith in https://reviews.llvm.org/D63640#inline-612718
Reviewers: rsmith, martong, shafik
Reviewed By: rsmith
Subscribers: rnkovacs, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69360
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 96e8c9c0d0e..9198d7a6fb2 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -1173,7 +1173,7 @@ public: llvm::Constant *VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *E, QualType T) { - return Visit(E->GetTemporaryExpr(), T); + return Visit(E->getSubExpr(), T); } llvm::Constant *EmitArrayInitialization(InitListExpr *ILE, QualType T) { @@ -2003,8 +2003,8 @@ ConstantLValueEmitter::VisitMaterializeTemporaryExpr( assert(E->getStorageDuration() == SD_Static); SmallVector<const Expr *, 2> CommaLHSs; SmallVector<SubobjectAdjustment, 2> Adjustments; - const Expr *Inner = E->GetTemporaryExpr() - ->skipRValueSubobjectAdjustments(CommaLHSs, Adjustments); + const Expr *Inner = + E->getSubExpr()->skipRValueSubobjectAdjustments(CommaLHSs, Adjustments); return CGM.GetAddrOfGlobalTemporary(E, Inner); } |