From: Bill Wendling Date: Tue, 29 Nov 2011 00:10:10 +0000 (+0000) Subject: The _setjmp builtin library function should have the "returns twice" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9e269e661ca7def681b69f2b88acf0c1fa3e654;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145332 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index 1cbcc58ae5..1db50a8f57 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -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: