[cfe-commits] r72649 - in /cfe/trunk/lib/CodeGen: CGExpr.cpp CGExprAgg.cpp CodeGenFunction.h
Anders Carlsson
andersca at mac.com
Sat May 30 16:30:54 PDT 2009
Author: andersca
Date: Sat May 30 18:30:54 2009
New Revision: 72649
URL: http://llvm.org/viewvc/llvm-project?rev=72649&view=rev
Log:
Add lvalue irgen support for CXXBindTemporaryExpr.
Modified:
cfe/trunk/lib/CodeGen/CGExpr.cpp
cfe/trunk/lib/CodeGen/CGExprAgg.cpp
cfe/trunk/lib/CodeGen/CodeGenFunction.h
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=72649&r1=72648&r2=72649&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Sat May 30 18:30:54 2009
@@ -191,8 +191,10 @@
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 @@
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);
Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=72649&r1=72648&r2=72649&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Sat May 30 18:30:54 2009
@@ -304,7 +304,6 @@
Visit(E->getSubExpr());
// FIXME: Record the value and dest ptr.
- Val->dump();
}
void
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=72649&r1=72648&r2=72649&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Sat May 30 18:30:54 2009
@@ -654,6 +654,7 @@
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);
More information about the cfe-commits
mailing list