From bcefeae5c1215377130c16e03a247ce84f2eef10 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. llvm-svn: 145332 --- clang/lib/CodeGen/CGObjCMac.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index 1cbcc58ae5f3..1db50a8f578e 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/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: