From 1bf5846abf2ce98c4c9c420d1757b01a1663d8cc Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 16 Feb 2011 08:02:54 +0000 Subject: Save a copy expression for non-trivial copy constructions of catch variables. llvm-svn: 125661 --- clang/lib/CodeGen/CGExpr.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang/lib/CodeGen/CGExpr.cpp') diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 049aeeeebb8..56a9107a82c 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -583,6 +583,8 @@ LValue CodeGenFunction::EmitLValue(const Expr *E) { return EmitConditionalOperatorLValue(cast(E)); case Expr::ChooseExprClass: return EmitLValue(cast(E)->getChosenSubExpr(getContext())); + case Expr::OpaqueValueExprClass: + return EmitOpaqueValueLValue(cast(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 //===--------------------------------------------------------------------===// -- cgit v1.2.3