From a9e269e661ca7def681b69f2b88acf0c1fa3e654 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 29 Nov 2011 00:10:10 +0000 Subject: [PATCH] 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 --- lib/CodeGen/CGObjCMac.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- 2.40.0