diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 505677bc7de5..de2c2744d5f0 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(E)); case Expr::CXXTemporaryObjectExprClass: case Expr::CXXConstructExprClass: - return EmitCXXConstructLValue(cast(E)); - + return EmitCXXConstructLValue(cast(E)); + case Expr::CXXBindTemporaryExprClass: + return EmitCXXBindTemporaryLValue(cast(E)); + case Expr::ObjCMessageExprClass: return EmitObjCMessageExprLValue(cast(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 343163ff2c85..140ecc4aca42 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 4411348a5865..939b8f8e9bab 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);