diff options
| author | John McCall <rjmccall@apple.com> | 2011-02-16 08:02:54 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2011-02-16 08:02:54 +0000 |
| commit | e996ffd240f20a1048179d7727a6ee3227261921 (patch) | |
| tree | 4401959697b60e22969148b60cd09e9b343fec14 /lib/CodeGen/CGExpr.cpp | |
| parent | c515d18023e952357d5dee645e6e3539b7b3d992 (diff) | |
| download | clang-e996ffd240f20a1048179d7727a6ee3227261921.tar.gz clang-e996ffd240f20a1048179d7727a6ee3227261921.tar.bz2 clang-e996ffd240f20a1048179d7727a6ee3227261921.tar.xz | |
Save a copy expression for non-trivial copy constructions of catch variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125661 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | lib/CodeGen/CGExpr.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 049aeeeebb..56a9107a82 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -583,6 +583,8 @@ LValue CodeGenFunction::EmitLValue(const Expr *E) { return EmitConditionalOperatorLValue(cast<ConditionalOperator>(E)); case Expr::ChooseExprClass: return EmitLValue(cast<ChooseExpr>(E)->getChosenSubExpr(getContext())); + case Expr::OpaqueValueExprClass: + return EmitOpaqueValueLValue(cast<OpaqueValueExpr>(E)); case Expr::ImplicitCastExprClass: case Expr::CStyleCastExprClass: case Expr::CXXFunctionalCastExprClass: @@ -1888,6 +1890,12 @@ LValue CodeGenFunction::EmitNullInitializationLValue( return LV; } +LValue CodeGenFunction::EmitOpaqueValueLValue(const OpaqueValueExpr *e) { + assert(e->isGLValue() || e->getType()->isRecordType()); + llvm::Value *value = getOpaqueValueMapping(e); + return MakeAddrLValue(value, e->getType()); +} + //===--------------------------------------------------------------------===// // Expression Emission //===--------------------------------------------------------------------===// |
