| 1 |
// Test this without pch. |
| 2 |
// RUN: %clang_cc1 -include %S/pragma-weak-functional.h %s -verify -emit-llvm -o - | FileCheck %s |
| 3 |
|
| 4 |
// Test with pch. |
| 5 |
// RUN: %clang_cc1 -x c-header -emit-pch -o %t %S/pragma-weak-functional.h |
| 6 |
// RUN: %clang_cc1 -include-pch %t %s -verify -emit-llvm -o - | FileCheck %s |
| 7 |
|
| 8 |
// CHECK-DAG: @undecfunc_alias1 = weak{{.*}} alias void (), ptr @undecfunc |
| 9 |
// CHECK-DAG: @undecfunc_alias2 = weak{{.*}} alias void (), ptr @undecfunc |
| 10 |
// CHECK-DAG: @undecfunc_alias3 = weak{{.*}} alias void (), ptr @undecfunc |
| 11 |
// CHECK-DAG: @undecfunc_alias4 = weak{{.*}} alias void (), ptr @undecfunc |
| 12 |
|
| 13 |
///////////// PR28611: Try multiple aliases of same undeclared symbol or alias |
| 14 |
void undecfunc_alias1(void); |
| 15 |
void undecfunc(void) { } |
| 16 |
// [email protected]:4 {{alias will always resolve to undecfunc}} |
| 17 |
// [email protected]:5 {{alias will always resolve to undecfunc}} |