| 1 |
// RUN: %clang_cc1 -mfunction-return=keep -triple x86_64-linux-gnu %s |
| 2 |
// RUN: %clang_cc1 -mfunction-return=thunk-extern -triple x86_64-linux-gnu %s |
| 3 |
|
| 4 |
// RUN: not %clang_cc1 -mfunction-return=thunk -triple x86_64-linux-gnu %s 2>&1 \ |
| 5 |
// RUN: | FileCheck --check-prefix=CHECK-THUNK %s |
| 6 |
// RUN: not %clang_cc1 -mfunction-return=thunk-inline -triple x86_64-linux-gnu %s 2>&1 \ |
| 7 |
// RUN: | FileCheck --check-prefix=CHECK-INLINE %s |
| 8 |
// RUN: not %clang_cc1 -mfunction-return=invalid -triple x86_64-linux-gnu %s 2>&1 \ |
| 9 |
// RUN: | FileCheck --check-prefix=CHECK-INVALID %s |
| 10 |
// RUN: not %clang_cc1 -mfunction-return=thunk-extern -triple s390x-linux-gnu %s 2>&1 \ |
| 11 |
// RUN: | FileCheck --check-prefix=CHECK-TARGET %s |
| 12 |
// RUN: not %clang_cc1 -mfunction-return=thunk-extern -mcmodel=large \ |
| 13 |
// RUN: -triple x86_64-linux-gnu %s 2>&1 \ |
| 14 |
// RUN: | FileCheck --check-prefix=CHECK-LARGE %s |
| 15 |
|
| 16 |
// CHECK-THUNK: error: invalid value 'thunk' in '-mfunction-return=thunk' |
| 17 |
// CHECK-INLINE: error: invalid value 'thunk-inline' in '-mfunction-return=thunk-inline' |
| 18 |
// CHECK-INVALID: error: invalid value 'invalid' in '-mfunction-return=invalid' |
| 19 |
// CHECK-TARGET: error: invalid argument '-mfunction-return=' not allowed with 's390x-unknown-linux-gnu' |
| 20 |
// CHECK-LARGE: error: invalid argument '-mfunction-return=thunk-extern' not allowed with '-mcmodel=large' |