mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-21 20:45:53 -04:00

This patch changes cc1 option -fprofile-instr-generate to an enum option -fprofile-instrument={clang|none}. It also changes cc1 options -fprofile-instr-generate= to -fprofile-instrument-path=. The driver level option -fprofile-instr-generate and -fprofile-instr-generate= remain intact. This change will pave the way to integrate new PGO instrumentation in IR level. Review: http://reviews.llvm.org/D16730 llvm-svn: 259811
27 lines
889 B
C
27 lines
889 B
C
// Check that the profiling counters and data we create have the linkage we expect
|
|
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-linkage.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
|
|
|
|
// CHECK: @__profc_foo = private global
|
|
// CHECK: @__profd_foo = private global
|
|
// CHECK: @__profc_foo_weak = weak hidden global
|
|
// CHECK: @__profd_foo_weak = weak hidden global
|
|
// CHECK: @__profc_main = private global
|
|
// CHECK: @__profd_main = private global
|
|
// CHECK: @__profc_c_linkage.c_foo_internal = private global
|
|
// CHECK: @__profd_c_linkage.c_foo_internal = private global
|
|
|
|
void foo(void) { }
|
|
|
|
void foo_weak(void) __attribute__((weak));
|
|
void foo_weak(void) { if (0){} if (0){} if (0){} if (0){} }
|
|
|
|
static void foo_internal(void);
|
|
int main(void) {
|
|
foo();
|
|
foo_internal();
|
|
foo_weak();
|
|
return 0;
|
|
}
|
|
|
|
static void foo_internal(void) { if (0){} if (0){} }
|