aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-07-11 08:38:19 +0000
committerJohn McCall <rjmccall@apple.com>2011-07-11 08:38:19 +0000
commit2673c68aa58e277ebc755b71d81aca618cdedbf9 (patch)
treebac33d78d7e725e30c528d0ac7503b7b6bf0cdaf /lib/CodeGen/CodeGenFunction.h
parent00d40eae546219786a74564fc0d95eab1978b82b (diff)
Fix a lot of problems with the partial destruction of arrays:
- an off-by-one error in emission of irregular array limits for InitListExprs - use an EH partial-destruction cleanup within the normal array-destruction cleanup - get the branch destinations right for the empty check Also some refactoring which unfortunately obscures these changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 7f2d8b9ed0..968222e334 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -1156,17 +1156,23 @@ public:
typedef void Destroyer(CodeGenFunction &CGF, llvm::Value *addr, QualType ty);
- void pushPartialArrayCleanup(llvm::Value *arrayBegin,
- QualType elementType,
- Destroyer &destroyer,
- llvm::Value *arrayEndPointer);
+ void pushIrregularPartialArrayCleanup(llvm::Value *arrayBegin,
+ llvm::Value *arrayEndPointer,
+ QualType elementType,
+ Destroyer &destroyer);
+ void pushRegularPartialArrayCleanup(llvm::Value *arrayBegin,
+ llvm::Value *arrayEnd,
+ QualType elementType,
+ Destroyer &destroyer);
Destroyer &getDestroyer(QualType::DestructionKind destructionKind);
void pushDestroy(CleanupKind kind, llvm::Value *addr, QualType type,
- Destroyer &destroyer);
- void emitDestroy(llvm::Value *addr, QualType type, Destroyer &destroyer);
+ Destroyer &destroyer, bool useEHCleanupForArray);
+ void emitDestroy(llvm::Value *addr, QualType type, Destroyer &destroyer,
+ bool useEHCleanupForArray);
void emitArrayDestroy(llvm::Value *begin, llvm::Value *end,
- QualType type, Destroyer &destroyer);
+ QualType type, Destroyer &destroyer,
+ bool useEHCleanup);
/// Determines whether an EH cleanup is required to destroy a type
/// with the given destruction kind.