]> granicus.if.org Git - clang/commitdiff
The _setjmp builtin library function should have the "returns twice"
authorBill Wendling <isanbard@gmail.com>
Tue, 29 Nov 2011 00:10:10 +0000 (00:10 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 29 Nov 2011 00:10:10 +0000 (00:10 +0000)
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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145332 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCMac.cpp

index 1cbcc58ae5f32827f4e6064f959d78bd95155800..1db50a8f578ea21013df2498fb21019170874042 100644 (file)
@@ -516,7 +516,8 @@ public:
     llvm::Type *params[] = { CGM.Int32Ty->getPointerTo() };
     return CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.Int32Ty,
                                                              params, false),
-                                     "_setjmp");
+                                     "_setjmp",
+                                     llvm::Attribute::ReturnsTwice);
   }
 
 public: