[cfe-commits] r145332 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp

Bill Wendling isanbard at gmail.com
Mon Nov 28 16:10:10 PST 2011


Author: void
Date: Mon Nov 28 18:10:10 2011
New Revision: 145332

URL: http://llvm.org/viewvc/llvm-project?rev=145332&view=rev
Log:
The _setjmp builtin library function should have the "returns twice"
attribute. This prevents the stack slot allocator from coming along and using a
stack which it thinks is available but isn't.
<rdar://problem/10492556>

Modified:
    cfe/trunk/lib/CodeGen/CGObjCMac.cpp

Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=145332&r1=145331&r2=145332&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Mon Nov 28 18:10:10 2011
@@ -516,7 +516,8 @@
     llvm::Type *params[] = { CGM.Int32Ty->getPointerTo() };
     return CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.Int32Ty,
                                                              params, false),
-                                     "_setjmp");
+                                     "_setjmp",
+                                     llvm::Attribute::ReturnsTwice);
   }
 
 public:





More information about the cfe-commits mailing list