diff options
author | Anders Carlsson <andersca@mac.com> | 2009-05-30 23:23:33 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-05-30 23:23:33 +0000 |
commit | b58d017f2b9eeed33f2ab3ede968b89cf5296bf2 (patch) | |
tree | 7001b9fe49bc4197b0c286af6546b9749e384e23 /lib/CodeGen/CGExpr.cpp | |
parent | 75bbb97f6e413633f2537e42f90547ccac559fde (diff) |
More temporary support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72648 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 12a8002de3..505677bc7d 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -189,7 +189,10 @@ LValue CodeGenFunction::EmitLValue(const Expr *E) { case Expr::CXXConditionDeclExprClass: return EmitCXXConditionDeclLValue(cast<CXXConditionDeclExpr>(E)); - + case Expr::CXXTemporaryObjectExprClass: + case Expr::CXXConstructExprClass: + return EmitCXXConstructLValue(cast<CXXConstructExpr>(E)); + case Expr::ObjCMessageExprClass: return EmitObjCMessageExprLValue(cast<ObjCMessageExpr>(E)); case Expr::ObjCIvarRefExprClass: @@ -1198,6 +1201,12 @@ CodeGenFunction::EmitCXXConditionDeclLValue(const CXXConditionDeclExpr *E) { return EmitDeclRefLValue(E); } +LValue CodeGenFunction::EmitCXXConstructLValue(const CXXConstructExpr *E) { + llvm::Value *Temp = CreateTempAlloca(ConvertTypeForMem(E->getType()), "tmp"); + EmitCXXConstructExpr(Temp, E); + return LValue::MakeAddr(Temp, E->getType().getCVRQualifiers()); +} + LValue CodeGenFunction::EmitObjCMessageExprLValue(const ObjCMessageExpr *E) { // Can only get l-value for message expression returning aggregate type RValue RV = EmitObjCMessageExpr(E); |