// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-captured.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOGEN -check-prefix=PGOALL %s
// RUN: llvm-profdata merge %S/Inputs/c-captured.proftext -o %t.profdata
// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-captured.c %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE -check-prefix=PGOALL %s
// PGOGEN: @[[DCC:__profc_debug_captured]] = private global [3 x i64] zeroinitializer
// PGOGEN: @[[CSC:__profc_c_captured.c___captured_stmt]] = private global [2 x i64] zeroinitializer
// PGOGEN: @[[C1C:__profc_c_captured.c___captured_stmt.1]] = private global [3 x i64] zeroinitializer
// PGOALL-LABEL: define{{.*}} void @debug_captured()
// PGOGEN: store {{.*}} @[[DCC]], i32 0, i32 0
void
// PGOUSE-DAG: ![[DC1]] = !{!"branch_weights", i32 2, i32 1}
// PGOUSE-DAG: ![[DC2]] = !{!"branch_weights", i32 2, i32 1}
// PGOUSE-DAG: ![[CS1]] = !{!"branch_weights", i32 2, i32 1}
// PGOUSE-DAG: ![[C11]] = !{!"branch_weights", i32 11, i32 2}
// PGOUSE-DAG: ![[C12]] = !{!"branch_weights", i32 2, i32 1}
int