30 lines · plain
1// RUN: %clang -O2 -c -o %t.0.o %S/../Inputs/extern_template.cpp2// RUN: %clang_profgen -O2 -c -o %t.o %S/../Inputs/extern_template.cpp3// RUN: %clang_profgen -O2 -fcoverage-mapping %S/../Inputs/extern_template1.cpp %S/../Inputs/extern_template2.cpp %t.o -o %t4// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t5// RUN: llvm-profdata show --all-functions %t.profraw | FileCheck %s6// RUN: llvm-profdata merge -o %t.profdata %t.profraw7// RUN: llvm-cov show -instr-profile=%t.profdata %t | FileCheck %S/../Inputs/extern_template.h8// RUN: %clang_profgen -O2 -fcoverage-mapping %S/../Inputs/extern_template1.cpp %S/../Inputs/extern_template2.cpp %t.0.o -o %t.09// RUN: env LLVM_PROFILE_FILE=%t.0.profraw %run %t.010// RUN: llvm-profdata show --all-functions %t.0.profraw | FileCheck %s11// RUN: llvm-profdata merge -o %t.0.profdata %t.0.profraw12// RUN: llvm-cov show -instr-profile=%t.0.profdata %t.0 | FileCheck %S/../Inputs/extern_template.h13#define DEF14#include "extern_template.h"15#undef DEF16extern int bar();17extern int foo();18extern Test<int> TO;19int main() {20 foo();21 int R = bar();22 23 if (R != 10)24 return 1;25 return 0;26}27// No duplicate entries28// CHECK: _ZN4TestIiE4doItEi:29// CHECK-NOT: _ZN4TestIiE4doItEi:30