blob: c2ff2abd3b793ede289b1b269c5604e994370bc8 [file] [log] [blame]
Stephen Hines651f13c2014-04-23 16:59:28 -07001// Make sure instrementation data from available_externally functions doesn't
2// get thrown out.
3// RUN: %clang_cc1 -O2 -triple x86_64-apple-macosx10.9 -main-file-name c-linkage-available_externally.c %s -o - -emit-llvm -fprofile-instr-generate | FileCheck %s
4
Stephen Hines6bcf27b2014-05-29 04:14:42 -07005// CHECK: @__llvm_profile_name_foo = linkonce_odr hidden constant [3 x i8] c"foo", section "__DATA,__llvm_prf_names", align 1
Stephen Hines0e2c34f2015-03-23 12:09:02 -07006
7// CHECK: @__llvm_profile_counters_foo = linkonce_odr hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -07008// CHECK: @__llvm_profile_data_foo = linkonce_odr hidden constant { i32, i32, i64, i8*, i64* } { i32 3, i32 1, i64 {{[0-9]+}}, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__llvm_profile_name_foo, i32 0, i32 0), i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__llvm_profile_counters_foo, i32 0, i32 0) }, section "__DATA,__llvm_prf_data", align 8
Stephen Hines651f13c2014-04-23 16:59:28 -07009inline int foo(void) { return 1; }
10
11int main(void) {
12 return foo();
13}