[llvm-commits] CVS: llvm-gcc/gcc/llvm-expand.c
Chris Lattner
lattner at cs.uiuc.edu
Sat Nov 27 14:44:42 PST 2004
Changes in directory llvm-gcc/gcc:
llvm-expand.c updated: 1.64 -> 1.65
---
Log message:
Relax an assertion a bit, fixing PR421: http://llvm.cs.uiuc.edu/PR421 and
test/Regression/C++Frontend/2004-11-27-ExceptionCleanupAssertion.cpp
---
Diffs of the changes: (+11 -2)
Index: llvm-gcc/gcc/llvm-expand.c
diff -u llvm-gcc/gcc/llvm-expand.c:1.64 llvm-gcc/gcc/llvm-expand.c:1.65
--- llvm-gcc/gcc/llvm-expand.c:1.64 Sat Nov 27 15:52:17 2004
+++ llvm-gcc/gcc/llvm-expand.c Sat Nov 27 16:44:30 2004
@@ -1114,8 +1114,17 @@
if (f->target_bb == BB) {
/* Unlink this fixup */
*fl = f->next;
- assert(f->containing_block == InnermostCleanupScope &&
- "Eliminating fixup for non-current scope!");
+
+ /* This fixup should either be the current cleanup scope or one of the
+ * parents. We may think the cleanup scope is one of our parents
+ * because we skip scopes without any cleanups.
+ */
+ if (f->containing_block != InnermostCleanupScope) {
+ llvm_nesting *ContScope = InnermostCleanupScope;
+ while (ContScope && f->containing_block != ContScope)
+ ContScope = ContScope->next;
+ assert(ContScope && "Eliminating fixup for non-current scope!");
+ }
free(f);
} else {
fl = &f->next;
More information about the llvm-commits
mailing list