| 1 |
// RUN: %clang_cc1 -emit-llvm -triple x86_64 %s -o - | FileCheck %s --check-prefixes=CHECK,CUSED |
| 2 |
// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin %s -o - | FileCheck %s --check-prefixes=CHECK,USED |
| 3 |
|
| 4 |
// USED: @llvm.used = |
| 5 |
// CUSED: @llvm.compiler.used = |
| 6 |
// CHECK-SAME: @f0 |
| 7 |
// CHECK-SAME: @f1.l0 |
| 8 |
// CHECK-SAME: @g0 |
| 9 |
// CHECK-SAME: @a0 |
| 10 |
|
| 11 |
int g0 __attribute__((used)); |
| 12 |
|
| 13 |
static void __attribute__((used)) f0(void) { |
| 14 |
} |
| 15 |
|
| 16 |
void f1(void) { |
| 17 |
static int l0 __attribute__((used)) = 5225; |
| 18 |
} |
| 19 |
|
| 20 |
__attribute__((used)) int a0; |
| 21 |
void pr27535(void) { (void)a0; } |