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>

llvm-svn: 145332
This commit is contained in:
Bill Wendling 2011-11-29 00:10:10 +00:00
parent d690111dd4
commit bcefeae5c1
1 changed files with 2 additions and 1 deletions
clang/lib/CodeGen

View 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: