summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-05-30 23:30:54 +0000
committerAnders Carlsson <andersca@mac.com>2009-05-30 23:30:54 +0000
commite61c9e80a108b5db7e5f0e702f0e455d737c6390 (patch)
tree2e159ec361951ff88aa7101c7ff13574df728f35 /lib/CodeGen/CGExpr.cpp
parentb58d017f2b9eeed33f2ab3ede968b89cf5296bf2 (diff)
downloadclang-e61c9e80a108b5db7e5f0e702f0e455d737c6390.tar.gz
clang-e61c9e80a108b5db7e5f0e702f0e455d737c6390.tar.bz2
clang-e61c9e80a108b5db7e5f0e702f0e455d737c6390.tar.xz
Add lvalue irgen support for CXXBindTemporaryExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72649 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 505677bc7d..de2c2744d5 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -191,8 +191,10 @@ LValue CodeGenFunction::EmitLValue(const Expr *E) {
return EmitCXXConditionDeclLValue(cast<CXXConditionDeclExpr>(E));
case Expr::CXXTemporaryObjectExprClass:
case Expr::CXXConstructExprClass:
- return EmitCXXConstructLValue(cast<CXXConstructExpr>(E));
-
+ return EmitCXXConstructLValue(cast<CXXConstructExpr>(E));
+ case Expr::CXXBindTemporaryExprClass:
+ return EmitCXXBindTemporaryLValue(cast<CXXBindTemporaryExpr>(E));
+
case Expr::ObjCMessageExprClass:
return EmitObjCMessageExprLValue(cast<ObjCMessageExpr>(E));
case Expr::ObjCIvarRefExprClass:
@@ -1207,6 +1209,15 @@ LValue CodeGenFunction::EmitCXXConstructLValue(const CXXConstructExpr *E) {
return LValue::MakeAddr(Temp, E->getType().getCVRQualifiers());
}
+LValue
+CodeGenFunction::EmitCXXBindTemporaryLValue(const CXXBindTemporaryExpr *E) {
+ LValue LV = EmitLValue(E->getSubExpr());
+
+ // FIXME: Record the value and dest ptr.
+
+ return LV;
+}
+
LValue CodeGenFunction::EmitObjCMessageExprLValue(const ObjCMessageExpr *E) {
// Can only get l-value for message expression returning aggregate type
RValue RV = EmitObjCMessageExpr(E);