[llvm-commits] CVS: llvm-gcc/gcc/llvm-expand.c

Chris Lattner lattner at cs.uiuc.edu
Thu Nov 18 20:49:59 PST 2004



Changes in directory llvm-gcc/gcc:

llvm-expand.c updated: 1.57 -> 1.58
---
Log message:

Fix a problem where we could not compile catch blocks with debug info.


---
Diffs of the changes:  (+11 -4)

Index: llvm-gcc/gcc/llvm-expand.c
diff -u llvm-gcc/gcc/llvm-expand.c:1.57 llvm-gcc/gcc/llvm-expand.c:1.58
--- llvm-gcc/gcc/llvm-expand.c:1.57	Thu Nov 18 22:39:01 2004
+++ llvm-gcc/gcc/llvm-expand.c	Thu Nov 18 22:49:45 2004
@@ -1413,10 +1413,17 @@
       llvm_instruction *I = llvm_ilist_front(llvm_instruction,
                                              EvalBlock->Instructions);
       llvm_instruction *Set;
-      assert(I->Opcode == O_Call && I->Operands[0]->VTy == Function &&
-             !strcmp(I->Operands[0]->Name, 
-                     "__llvm_cxxeh_begin_catch_if_isa") && 
-             "Not a call to __llvm_cxxeh_begin_catch_if_isa!");
+
+      /* Because we have debug information, search for the call to
+       * __llvm_cxxeh_begin_catch_if_isa, which may be after some debugging
+       * related stuff.
+       */
+      while (I->Opcode != O_Call || I->Operands[0]->VTy != Function ||
+             strcmp(I->Operands[0]->Name, "__llvm_cxxeh_begin_catch_if_isa")) {
+        assert(I != llvm_ilist_end(EvalBlock->Instructions) &&
+               "Did not find call to __llvm_cxxeh_begin_catch_if_isa!");
+        I = I->Next;
+      }
 
       /* Move the ...isa call into the EvalBlock */
       llvm_ilist_splice(llvm_instruction, CondBlock->Instructions,






More information about the llvm-commits mailing list