1 ; RUN: llc -mtriple x86_64-apple-macosx10.8.0 -warn-stack-size=80 < %s 2>&1 >/dev/null | FileCheck %s
2 ; Check the internal option that warns when the stack size exceeds the
7 define void @nowarn() nounwind ssp {
9 %buffer = alloca [12 x i8], align 1
10 %arraydecay = getelementptr inbounds [12 x i8], [12 x i8]* %buffer, i64 0, i64 0
11 call void @doit(i8* %arraydecay) nounwind
15 ; CHECK: warning: stack size limit exceeded (88) in warn
16 define void @warn() nounwind ssp {
18 %buffer = alloca [80 x i8], align 1
19 %arraydecay = getelementptr inbounds [80 x i8], [80 x i8]* %buffer, i64 0, i64 0
20 call void @doit(i8* %arraydecay) nounwind
24 declare void @doit(i8*)