Add lvalue irgen support for CXXBindTemporaryExpr.

llvm-svn: 72649
This commit is contained in:
Anders Carlsson 2009-05-30 23:30:54 +00:00
parent 3be22e27b6
commit fd2af0cf86
3 changed files with 14 additions and 3 deletions

View File

@ -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);

View File

@ -304,7 +304,6 @@ void AggExprEmitter::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) {
Visit(E->getSubExpr());
// FIXME: Record the value and dest ptr.
Val->dump();
}
void

View File

@ -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);