summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-02-16 08:02:54 +0000
committerJohn McCall <rjmccall@apple.com>2011-02-16 08:02:54 +0000
commit1bf5846abf2ce98c4c9c420d1757b01a1663d8cc (patch)
tree2dcbb6372072983963df0b5d6bf58a31bdf103d0 /clang/lib/CodeGen/CGExprScalar.cpp
parentc8fb2557b9e96fcde75d8cb4a5bf6de06e1ea470 (diff)
downloadbcm5719-llvm-1bf5846abf2ce98c4c9c420d1757b01a1663d8cc.tar.gz
bcm5719-llvm-1bf5846abf2ce98c4c9c420d1757b01a1663d8cc.zip
Save a copy expression for non-trivial copy constructions of catch variables.
llvm-svn: 125661
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp7
1 files changed, 7 insertions, 0 deletions
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) {
OpenPOWER on IntegriCloud