1 // For these next two tests when optimized we should omit the leaf frame 2 // pointer, for unoptimized we should have a leaf frame pointer. 3 // RUN: %clang -### -target i386-pc-linux-gnu -S -O1 %s 2>&1 | \ 4 // RUN: FileCheck --check-prefix=LINUX-OPT %s 5 // LINUX-OPT: "-momit-leaf-frame-pointer" 6 7 // RUN: %clang -### -target i386-pc-linux-gnu -S %s 2>&1 | \ 8 // RUN: FileCheck --check-prefix=LINUX %s 9 // LINUX-NOT: "-momit-leaf-frame-pointer" 10 11 // Darwin disables omitting the leaf frame pointer even under optimization 12 // unless the command lines are given. 13 // RUN: %clang -### -target i386-apple-darwin -S %s 2>&1 | \ 14 // RUN: FileCheck --check-prefix=DARWIN %s 15 // DARWIN: "-mdisable-fp-elim" 16 17 // RUN: %clang -### -target i386-apple-darwin -S -O1 %s 2>&1 | \ 18 // RUN: FileCheck --check-prefix=DARWIN-OPT %s 19 // DARWIN-OPT-NOT: "-momit-leaf-frame-pointer" 20 21 // RUN: %clang -### -target i386-darwin -S -fomit-frame-pointer %s 2>&1 | \ 22 // RUN: FileCheck --check-prefix=OMIT_ALL %s 23 // OMIT_ALL-NOT: "-mdisable-fp-elim" 24 25 // RUN: %clang -### -target i386-darwin -S -momit-leaf-frame-pointer %s 2>&1 | \ 26 // RUN: FileCheck --check-prefix=OMIT_LEAF %s 27 // OMIT_LEAF: "-momit-leaf-frame-pointer" 28 29 void f0() {} 30 void f1() { f0(); } 31