| 1 |
// RUN: %clang_cc1 -S < %s -fpass-plugin=%llvmshlibdir/Bye%pluginext 2>&1 | FileCheck %s --check-prefix=CHECK-INACTIVE |
| 2 |
// RUN: %clang_cc1 -S < %s -fpass-plugin=%llvmshlibdir/Bye%pluginext -mllvm -last-words | FileCheck %s --check-prefix=CHECK-ACTIVE |
| 3 |
// RUN: %clang_cc1 -emit-llvm < %s -fpass-plugin=%llvmshlibdir/Bye%pluginext -mllvm -last-words | FileCheck %s --check-prefix=CHECK-LLVM |
| 4 |
// RUN: not %clang_cc1 -emit-obj < %s -fpass-plugin=%llvmshlibdir/Bye%pluginext -mllvm -last-words 2>&1 | FileCheck %s --check-prefix=CHECK-ERR |
| 5 |
// REQUIRES: plugins, llvm-examples |
| 6 |
// UNSUPPORTED: target={{.*windows.*}} |
| 7 |
// Plugins are currently broken on AIX, at least in the CI. |
| 8 |
// XFAIL: target={{.*}}-aix{{.*}} |
| 9 |
// CHECK-INACTIVE-NOT: Bye |
| 10 |
// CHECK-ACTIVE: CodeGen Bye |
| 11 |
// CHECK-LLVM: define{{.*}} i32 @f |
| 12 |
// CHECK-ERR: error: last words unsupported for binary output |
| 13 |
|
| 14 |
int f(int x) { |
| 15 |
return x; |
| 16 |
} |