summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commitfd2af0cf86a761158050218a92ea13a15cdd9303 (patch)
tree7033b7baaad4afb15827b77934c75757074b5843 /clang/lib
parent3be22e27b6239844272ae1823419354ded42169d (diff)
downloadbcm5719-llvm-fd2af0cf86a761158050218a92ea13a15cdd9303.tar.gz
bcm5719-llvm-fd2af0cf86a761158050218a92ea13a15cdd9303.zip
Add lvalue irgen support for CXXBindTemporaryExpr.
llvm-svn: 72649
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp15
-rw-r--r--clang/lib/CodeGen/CGExprAgg.cpp1
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h1
3 files changed, 14 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 505677bc7de..de2c2744d5f 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/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);
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp
index 343163ff2c8..140ecc4aca4 100644
--- a/clang/lib/CodeGen/CGExprAgg.cpp
+++ b/clang/lib/CodeGen/CGExprAgg.cpp
@@ -304,7 +304,6 @@ void AggExprEmitter::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) {
Visit(E->getSubExpr());
// FIXME: Record the value and dest ptr.
- Val->dump();
}
void
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 4411348a586..939b8f8e9ba 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -654,6 +654,7 @@ public:
LValue EmitCXXConditionDeclLValue(const CXXConditionDeclExpr *E);
LValue EmitCXXConstructLValue(const CXXConstructExpr *E);
+ LValue EmitCXXBindTemporaryLValue(const CXXBindTemporaryExpr *E);
LValue EmitObjCMessageExprLValue(const ObjCMessageExpr *E);
LValue EmitObjCIvarRefLValue(const ObjCIvarRefExpr *E);
OpenPOWER on IntegriCloud