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/CGExprScalar.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang/lib/CodeGen/CGExprScalar.cpp') diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index e2e404f70fb..99f3f0d3231 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -199,6 +199,13 @@ public: return llvm::ConstantInt::get(ConvertType(E->getType()), E->getPackLength()); } + + Value *VisitOpaqueValueExpr(OpaqueValueExpr *E) { + if (E->isGLValue()) return EmitLoadOfLValue(E); + + // Otherwise, assume the mapping is the scalar directly. + return CGF.getOpaqueValueMapping(E); + } // l-values. Value *VisitDeclRefExpr(DeclRefExpr *E) { -- cgit v1.2.3