diff options
author | John McCall <rjmccall@apple.com> | 2011-08-25 20:40:09 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-08-25 20:40:09 +0000 |
commit | 7c2349be2d11143a2e59a167fd43362a3bf4585e (patch) | |
tree | 659919c6498d257a2c725e1f5a11e32a21b8ee15 /lib/CodeGen/CGClass.cpp | |
parent | 03c107a42fae79e89d0016999a1a04c07d65591a (diff) |
Use stronger typing for the flags on AggValueSlot and require
creators to tell us whether something needs GC barriers.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138581 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r-- | lib/CodeGen/CGClass.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp index 1acbb0886a..8e46fcd3ed 100644 --- a/lib/CodeGen/CGClass.cpp +++ b/lib/CodeGen/CGClass.cpp @@ -398,8 +398,10 @@ static void EmitBaseInitializer(CodeGenFunction &CGF, BaseClassDecl, isBaseVirtual); - AggValueSlot AggSlot = AggValueSlot::forAddr(V, Qualifiers(), - /*Lifetime*/ true); + AggValueSlot AggSlot = + AggValueSlot::forAddr(V, Qualifiers(), + AggValueSlot::IsDestructed, + AggValueSlot::DoesNotNeedGCBarriers); CGF.EmitAggExpr(BaseInit->getInit(), AggSlot); @@ -436,8 +438,10 @@ static void EmitAggMemberInitializer(CodeGenFunction &CGF, CGF.EmitComplexExprIntoAddr(MemberInit->getInit(), Dest, LHS.isVolatileQualified()); } else { - AggValueSlot Slot = AggValueSlot::forAddr(Dest, LHS.getQuals(), - /*Lifetime*/ true); + AggValueSlot Slot = + AggValueSlot::forAddr(Dest, LHS.getQuals(), + AggValueSlot::IsDestructed, + AggValueSlot::DoesNotNeedGCBarriers); CGF.EmitAggExpr(MemberInit->getInit(), Slot); } @@ -1324,7 +1328,9 @@ CodeGenFunction::EmitDelegatingCXXConstructorCall(const CXXConstructorDecl *Ctor llvm::Value *ThisPtr = LoadCXXThis(); AggValueSlot AggSlot = - AggValueSlot::forAddr(ThisPtr, Qualifiers(), /*Lifetime*/ true); + AggValueSlot::forAddr(ThisPtr, Qualifiers(), + AggValueSlot::IsDestructed, + AggValueSlot::DoesNotNeedGCBarriers); EmitAggExpr(Ctor->init_begin()[0]->getInit(), AggSlot); |