[llvm-commits] [llvm-gcc-4.2] r49236 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

Dale Johannesen dalej at apple.com
Fri Apr 4 15:21:41 PDT 2008


Author: johannes
Date: Fri Apr  4 17:21:41 2008
New Revision: 49236

URL: http://llvm.org/viewvc/llvm-project?rev=49236&view=rev
Log:
Honor -funwind-tables for generating EH unwind info.
(This is the default on Darwin x86-64).


Modified:
    llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=49236&r1=49235&r2=49236&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Fri Apr  4 17:21:41 2008
@@ -1055,7 +1055,7 @@
   // Compute whether the result needs to be zext or sext'd.
   ParameterAttributes RAttributes = HandleArgumentExtension(ReturnType);
   // Make sure all functions are marked nounwind if we aren't using exceptions.
-  if (!flag_exceptions)
+  if (!flag_exceptions && !flag_unwind_tables)
     RAttributes |= ParamAttr::NoUnwind;
 
   if (RAttributes != ParamAttr::None)
@@ -1124,7 +1124,7 @@
   // Check for 'nounwind' function attribute.
   // When flag_exceptions is not set (it is set by default in C++/ObjC++), 
   // don't unwind anything.
-  if ((flags & ECF_NOTHROW) || !flag_exceptions)
+  if ((flags & ECF_NOTHROW) || (!flag_exceptions && !flag_unwind_tables))
     RAttributes |= ParamAttr::NoUnwind;
 
   // Check for 'readnone' function attribute.





More information about the llvm-commits mailing list