blob: e9dc22b3aa1f15022c527a03a5b7eae08f8ca264 [file] [log] [blame]
Nick Lewycky5b5828b2011-02-02 07:17:02 +00001// RUN: %clang -ccc-host-triple i386-apple-darwin -S -o - %s | \
2// RUN: FileCheck --check-prefix=DARWIN %s
3// DARWIN: f0:
4// DARWIN: pushl %ebp
5// DARWIN: ret
6// DARWIN: f1:
7// DARWIN: pushl %ebp
8// DARWIN: ret
Daniel Dunbar1ad66482010-07-01 01:31:45 +00009
Nick Lewycky5b5828b2011-02-02 07:17:02 +000010// RUN: %clang -ccc-host-triple i386-pc-linux-gnu -S -o - %s | \
11// RUN: FileCheck --check-prefix=LINUX %s
12// LINUX: f0:
13// LINUX-NOT: pushl %ebp
14// LINUX: ret
15// LINUX: f1:
16// LINUX: pushl %ebp
17// LINUX: ret
18
19// RUN: %clang -ccc-host-triple i386-darwin -S -o - -fomit-frame-pointer %s | \
Daniel Dunbar1ad66482010-07-01 01:31:45 +000020// RUN: FileCheck --check-prefix=OMIT_ALL %s
21// OMIT_ALL: f0:
22// OMIT_ALL-NOT: pushl %ebp
23// OMIT_ALL: ret
24// OMIT_ALL: f1:
25// OMIT_ALL-NOT: pushl %ebp
26// OMIT_ALL: ret
27
Nick Lewycky5b5828b2011-02-02 07:17:02 +000028// RUN: %clang -ccc-host-triple i386-darwin -S -o - -momit-leaf-frame-pointer %s | \
Daniel Dunbar1ad66482010-07-01 01:31:45 +000029// RUN: FileCheck --check-prefix=OMIT_LEAF %s
30// OMIT_LEAF: f0:
31// OMIT_LEAF-NOT: pushl %ebp
32// OMIT_LEAF: ret
33// OMIT_LEAF: f1:
34// OMIT_LEAF: pushl %ebp
35// OMIT_LEAF: ret
36
37void f0() {}
38void f1() { f0(); }