blob: 669e8eddb57e71abe6278ea970c0b45ee9f821a7 [file] [log] [blame]
Stephen Hines651f13c2014-04-23 16:59:28 -07001// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -emit-llvm -main-file-name cxx-linkage.cpp %s -o - -fprofile-instr-generate | FileCheck %s
2
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -07003// CHECK: @__llvm_profile_name__Z3foov = private constant [7 x i8] c"_Z3foov"
Stephen Hines0e2c34f2015-03-23 12:09:02 -07004// CHECK: @__llvm_profile_name__Z8foo_weakv = weak hidden constant [12 x i8] c"_Z8foo_weakv"
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -07005// CHECK: @__llvm_profile_name_main = private constant [4 x i8] c"main"
Stephen Hines0e2c34f2015-03-23 12:09:02 -07006// CHECK: @__llvm_profile_name__Z10foo_inlinev = linkonce_odr hidden constant [15 x i8] c"_Z10foo_inlinev"
7
Stephen Hines651f13c2014-04-23 16:59:28 -07008void foo(void) { }
9
Stephen Hines651f13c2014-04-23 16:59:28 -070010void foo_weak(void) __attribute__((weak));
11void foo_weak(void) { if (0){} if (0){} if (0){} if (0){} }
12
Stephen Hines651f13c2014-04-23 16:59:28 -070013inline void foo_inline(void);
14int main(void) {
15 foo();
16 foo_inline();
17 foo_weak();
18 return 0;
19}
20
Stephen Hines651f13c2014-04-23 16:59:28 -070021inline void foo_inline(void) { if (0){} if (0){} if (0){} if (0){} if (0){} if (0){}}