2016-01-29 02:25:53 +08:00
|
|
|
// Make sure instrumentation data from available_externally functions doesn't
|
|
|
|
// get thrown out and are emitted with the expected linkage.
|
2016-02-05 02:39:09 +08:00
|
|
|
// RUN: %clang_cc1 -O2 -triple x86_64-apple-macosx10.9 -main-file-name c-linkage-available_externally.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
|
2014-03-21 06:50:08 +08:00
|
|
|
|
2015-12-15 08:33:12 +08:00
|
|
|
// CHECK: @__profc_foo = linkonce_odr hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
|
2016-10-12 05:56:05 +08:00
|
|
|
// CHECK: @__profd_foo = linkonce_odr hidden global {{.*}} i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc_foo, i32 0, i32 0){{.*}}, section "__DATA,__llvm_prf_data,regular,live_support", align 8
|
2014-03-21 06:50:08 +08:00
|
|
|
inline int foo(void) { return 1; }
|
|
|
|
|
|
|
|
int main(void) {
|
|
|
|
return foo();
|
|
|
|
}
|