re PR fortran/48448 (Implement -f(no-)frontend-optimization)
[platform/upstream/gcc.git] / gcc / unwind-dw2-fde-darwin.c
index cd00ea2..75b404e 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2003, 2005, 2009, 2010
+   Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -273,3 +274,16 @@ _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases)
                                          the_obj_info);
   return ret;
 }
+
+void *
+_darwin10_Unwind_FindEnclosingFunction (void *pc ATTRIBUTE_UNUSED)
+{
+#if __MACH__ && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060)
+  struct dwarf_eh_bases bases;
+  const struct dwarf_fde *fde = _Unwind_Find_FDE (pc-1, &bases);
+  if (fde)
+    return bases.func;
+#endif
+  return NULL;
+}
+