diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-10-22 21:01:02 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-10-22 21:01:02 +0000 |
commit | 07ed93f378a8868c9a7c04ca7ae685b85c55e5ea (patch) | |
tree | b3bf117c0c0491cd2af870b5383fc5ac4b4fc440 /lib/CodeGen/CGValue.h | |
parent | 6802027338b8af1d54ba94d7ed9722f1b327b645 (diff) |
Patch fixes miscompile with non-trivial copy constructors and
statement expressions, //rdar: //8540501
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117146 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGValue.h')
-rw-r--r-- | lib/CodeGen/CGValue.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/CodeGen/CGValue.h b/lib/CodeGen/CGValue.h index a000b22331..fd82be7558 100644 --- a/lib/CodeGen/CGValue.h +++ b/lib/CodeGen/CGValue.h @@ -26,6 +26,7 @@ namespace llvm { namespace clang { class ObjCPropertyRefExpr; class ObjCImplicitSetterGetterRefExpr; + class CXXConstructExpr; namespace CodeGen { class CGBitFieldInfo; @@ -335,6 +336,7 @@ public: class AggValueSlot { /// The address. llvm::Value *Addr; + CXXConstructExpr *CtorExpr; // Associated flags. bool VolatileFlag : 1; @@ -347,6 +349,7 @@ public: static AggValueSlot ignored() { AggValueSlot AV; AV.Addr = 0; + AV.CtorExpr = 0; AV.VolatileFlag = AV.LifetimeFlag = AV.RequiresGCollection = 0; return AV; } @@ -364,6 +367,7 @@ public: bool RequiresGCollection=false) { AggValueSlot AV; AV.Addr = Addr; + AV.CtorExpr = 0; AV.VolatileFlag = Volatile; AV.LifetimeFlag = LifetimeExternallyManaged; AV.RequiresGCollection = RequiresGCollection; @@ -375,7 +379,10 @@ public: return forAddr(LV.getAddress(), LV.isVolatileQualified(), LifetimeExternallyManaged, RequiresGCollection); } - + + void setCtorExpr(CXXConstructExpr *E) { CtorExpr = E; } + CXXConstructExpr *getCtorExpr() const { return CtorExpr; } + bool isLifetimeExternallyManaged() const { return LifetimeFlag; } |