[llvm-commits] [llvm-gcc-4.2] r41509 - /llvm-gcc-4.2/trunk/gcc/except.c

Duncan Sands baldrick at free.fr
Mon Aug 27 12:58:09 PDT 2007


Author: baldrick
Date: Mon Aug 27 14:58:09 2007
New Revision: 41509

URL: http://llvm.org/viewvc/llvm-project?rev=41509&view=rev
Log:
After further thought and testing, it seems that
it is foreach_reachable_handler that should be
modified to agree with can_throw_external_1, and
not the other way round.

Modified:
    llvm-gcc-4.2/trunk/gcc/except.c

Modified: llvm-gcc-4.2/trunk/gcc/except.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/except.c?rev=41509&r1=41508&r2=41509&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/except.c (original)
+++ llvm-gcc-4.2/trunk/gcc/except.c Mon Aug 27 14:58:09 2007
@@ -2663,9 +2663,13 @@
 	 processing any more of them.  Each cleanup will have an edge
 	 to the next outer cleanup region, so the flow graph will be
 	 accurate.  */
+/* LLVM local */
+#ifndef ENABLE_LLVM
       if (region->type == ERT_CLEANUP)
 	region = region->u.cleanup.prev_try;
       else
+/* LLVM local */
+#endif
 	region = region->outer;
     }
 }
@@ -2800,21 +2804,9 @@
 
   /* If the exception is caught or blocked by any containing region,
      then it is not seen by any calling function.  */
-  /* LLVM local begin */
-  while (region)
-    {
-      if (reachable_next_level (region, type_thrown, NULL) >= RNL_CAUGHT)
-        return false;
-      /* If we have processed one cleanup, there is no point in
-         processing any more of them.  Each cleanup will have an edge
-         to the next outer cleanup region, so the flow graph will be
-         accurate.  */
-      if (region->type == ERT_CLEANUP)
-        region = region->u.cleanup.prev_try;
-      else
-        region = region->outer;
-    }
-  /* LLVM local end */
+  for (; region ; region = region->outer)
+    if (reachable_next_level (region, type_thrown, NULL) >= RNL_CAUGHT)
+      return false;
 
   return true;
 }





More information about the llvm-commits mailing list