Daniel Dunbar | 1ad6648 | 2010-07-01 01:31:45 +0000 | [diff] [blame^] | 1 | // RUN: %clang -ccc-host-triple i386 -S -o - %s | \ |
| 2 | // RUN: FileCheck --check-prefix=DEFAULT %s |
| 3 | // DEFAULT: f0: |
| 4 | // DEFAULT: pushl %ebp |
| 5 | // DEFAULT: ret |
| 6 | // DEFAULT: f1: |
| 7 | // DEFAULT: pushl %ebp |
| 8 | // DEFAULT: ret |
| 9 | |
| 10 | // RUN: %clang -ccc-host-triple i386 -S -o - -fomit-frame-pointer %s | \ |
| 11 | // RUN: FileCheck --check-prefix=OMIT_ALL %s |
| 12 | // OMIT_ALL: f0: |
| 13 | // OMIT_ALL-NOT: pushl %ebp |
| 14 | // OMIT_ALL: ret |
| 15 | // OMIT_ALL: f1: |
| 16 | // OMIT_ALL-NOT: pushl %ebp |
| 17 | // OMIT_ALL: ret |
| 18 | |
| 19 | // RUN: %clang -ccc-host-triple i386 -S -o - -momit-leaf-frame-pointer %s | \ |
| 20 | // RUN: FileCheck --check-prefix=OMIT_LEAF %s |
| 21 | // OMIT_LEAF: f0: |
| 22 | // OMIT_LEAF-NOT: pushl %ebp |
| 23 | // OMIT_LEAF: ret |
| 24 | // OMIT_LEAF: f1: |
| 25 | // OMIT_LEAF: pushl %ebp |
| 26 | // OMIT_LEAF: ret |
| 27 | |
| 28 | void f0() {} |
| 29 | void f1() { f0(); } |