diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CoverageMapping/abspath.cpp | 4 | ||||
| -rw-r--r-- | clang/test/CoverageMapping/ir.c | 25 | ||||
| -rw-r--r-- | clang/test/Profile/def-assignop.cpp | 7 | ||||
| -rw-r--r-- | clang/test/Profile/def-ctors.cpp | 10 | ||||
| -rw-r--r-- | clang/test/Profile/def-dtors.cpp | 10 |
5 files changed, 13 insertions, 43 deletions
diff --git a/clang/test/CoverageMapping/abspath.cpp b/clang/test/CoverageMapping/abspath.cpp index 1c415691651..892dff8de01 100644 --- a/clang/test/CoverageMapping/abspath.cpp +++ b/clang/test/CoverageMapping/abspath.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -mllvm -enable-name-compression=false -emit-llvm -main-file-name abspath.cpp %S/Inputs/../abspath.cpp -o - | FileCheck -check-prefix=RMDOTS %s +// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -main-file-name abspath.cpp %S/Inputs/../abspath.cpp -o - | FileCheck -check-prefix=RMDOTS %s // RMDOTS: @__llvm_coverage_mapping = {{.*}}"\01 // RMDOTS-NOT: Inputs @@ -6,7 +6,7 @@ // RUN: mkdir -p %t/test && cd %t/test // RUN: echo "void f1() {}" > f1.c -// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -mllvm -enable-name-compression=false -emit-llvm -main-file-name abspath.cpp ../test/f1.c -o - | FileCheck -check-prefix=RELPATH %s +// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -main-file-name abspath.cpp ../test/f1.c -o - | FileCheck -check-prefix=RELPATH %s // RELPATH: @__llvm_coverage_mapping = {{.*}}"\01 // RELPATH: {{[/\\].*(/|\\\\)test(/|\\\\)f1}}.c diff --git a/clang/test/CoverageMapping/ir.c b/clang/test/CoverageMapping/ir.c index f5ba39c7472..469b2992ecd 100644 --- a/clang/test/CoverageMapping/ir.c +++ b/clang/test/CoverageMapping/ir.c @@ -1,31 +1,12 @@ // Check the data structures emitted by coverage mapping -// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name ir.c %s -o - -emit-llvm -fprofile-instrument=clang -fcoverage-mapping -mllvm -enable-name-compression=false | FileCheck %s -check-prefixes=COMMON,DARWIN -// RUN: %clang_cc1 -triple x86_64--windows-msvc -main-file-name ir.c %s -o - -emit-llvm -fprofile-instrument=clang -fcoverage-mapping -mllvm -enable-name-compression=false | FileCheck %s -check-prefixes=COMMON,WINDOWS +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name ir.c %s -o - -emit-llvm -fprofile-instrument=clang -fcoverage-mapping | FileCheck %s -static inline void unused() {} -void foo(void) {} +void foo(void) { } int main(void) { foo(); return 0; } -// Check the function records. Two of the record names should come in the 'used' -// flavor, and one should not. - -// DARWIN: [[FuncRecord1:@__covrec_[0-9A-F]+u]] = linkonce_odr hidden constant <{ i64, i32, i64, i64, [{{.*}} x i8] }> <{ {{.*}} }>, section "__LLVM_COV,__llvm_covfun", align 8 -// DARWIN: [[FuncRecord2:@__covrec_[0-9A-F]+u]] = linkonce_odr hidden constant <{ i64, i32, i64, i64, [{{.*}} x i8] }> <{ {{.*}} }>, section "__LLVM_COV,__llvm_covfun", align 8 -// DARWIN: [[FuncRecord3:@__covrec_[0-9A-F]+]] = linkonce_odr hidden constant <{ i64, i32, i64, i64, [{{.*}} x i8] }> <{ {{.*}} }>, section "__LLVM_COV,__llvm_covfun", align 8 -// DARWIN: @__llvm_coverage_mapping = private constant { { i32, i32, i32, i32 }, [{{.*}} x i8] } { {{.*}} }, section "__LLVM_COV,__llvm_covmap", align 8 - -// WINDOWS: [[FuncRecord1:@__covrec_[0-9A-F]+u]] = linkonce_odr hidden constant <{ i64, i32, i64, i64, [{{.*}} x i8] }> <{ {{.*}} }>, section ".lcovfun$M", comdat, align 8 -// WINDOWS: [[FuncRecord2:@__covrec_[0-9A-F]+u]] = linkonce_odr hidden constant <{ i64, i32, i64, i64, [{{.*}} x i8] }> <{ {{.*}} }>, section ".lcovfun$M", comdat, align 8 -// WINDOWS: [[FuncRecord3:@__covrec_[0-9A-F]+]] = linkonce_odr hidden constant <{ i64, i32, i64, i64, [{{.*}} x i8] }> <{ {{.*}} }>, section ".lcovfun$M", comdat, align 8 -// WINDOWS: @__llvm_coverage_mapping = private constant { { i32, i32, i32, i32 }, [{{.*}} x i8] } { {{.*}} }, section ".lcovmap$M", align 8 - -// COMMON: @llvm.used = appending global [{{.*}} x i8*] -// COMMON-SAME: [[FuncRecord1]] -// COMMON-SAME: [[FuncRecord2]] -// COMMON-SAME: [[FuncRecord3]] -// COMMON-SAME: @__llvm_coverage_mapping +// CHECK: @__llvm_coverage_mapping = internal constant { { i32, i32, i32, i32 }, [2 x <{ i64, i32, i64 }>], [{{[0-9]+}} x i8] } { { i32, i32, i32, i32 } { i32 2, i32 {{[0-9]+}}, i32 {{[0-9]+}}, i32 {{[0-9]+}} }, [2 x <{ i64, i32, i64 }>] [<{{.*}}> <{{.*}}>, <{{.*}}> <{{.*}}>] diff --git a/clang/test/Profile/def-assignop.cpp b/clang/test/Profile/def-assignop.cpp index d17654f3142..2d453364a55 100644 --- a/clang/test/Profile/def-assignop.cpp +++ b/clang/test/Profile/def-assignop.cpp @@ -18,12 +18,9 @@ struct A { // PGOGEN: {{.*}}add{{.*}}%pgocount, 1 // PGOGEN: store{{.*}}@__profc__ZN1AaSEOS_ - // Check that coverage mapping includes 3 function records including the + // Check that coverage mapping includes 6 function records including the // defaulted copy and move operators: A::operator= - // COVMAP: section "__llvm_covfun", comdat - // COVMAP: section "__llvm_covfun", comdat - // COVMAP: section "__llvm_covfun", comdat - // COVMAP: @__llvm_coverage_mapping = {{.*}} { { i32, i32, i32, i32 } + // COVMAP: @__llvm_coverage_mapping = {{.*}} { { i32, i32, i32, i32 }, [3 x <{{.*}}>], B b; }; diff --git a/clang/test/Profile/def-ctors.cpp b/clang/test/Profile/def-ctors.cpp index 0179bc92dbb..1b52d559e01 100644 --- a/clang/test/Profile/def-ctors.cpp +++ b/clang/test/Profile/def-ctors.cpp @@ -20,15 +20,11 @@ struct Derived : public Base { // PGOGEN-DAG: {{.*}}add{{.*}}%pgocount, 1 // PGOGEN-DAG: store{{.*}}@__profc__ZN7DerivedC2Ev - // Check that coverage mapping has 5 function records including + // Check that coverage mapping has 6 function records including // the defaulted Derived::Derived(const Derived), and Derived::Derived() // methds. - // COVMAP: section "__llvm_covfun", comdat - // COVMAP: section "__llvm_covfun", comdat - // COVMAP: section "__llvm_covfun", comdat - // COVMAP: section "__llvm_covfun", comdat - // COVMAP: section "__llvm_covfun", comdat - // COVMAP: @__llvm_coverage_mapping = {{.*}} { { i32, i32, i32, i32 } + // COVMAP: @__llvm_coverage_mapping = {{.*}} { { i32, i32, i32, i32 }, [5 x + // <{{.*}}>], }; Derived dd; diff --git a/clang/test/Profile/def-dtors.cpp b/clang/test/Profile/def-dtors.cpp index dc87508fe7c..bfa535634d1 100644 --- a/clang/test/Profile/def-dtors.cpp +++ b/clang/test/Profile/def-dtors.cpp @@ -16,14 +16,10 @@ struct Derived : public Base { // PGOGEN: {{.*}}add{{.*}}%pgocount, 1 // PGOGEN: store{{.*}}@__profc__ZN7DerivedD2Ev - // Check that coverage mapping has 5 function records including + // Check that coverage mapping has 6 function records including // the default destructor in the derived class. - // COVMAP: section "__llvm_covfun", comdat - // COVMAP: section "__llvm_covfun", comdat - // COVMAP: section "__llvm_covfun", comdat - // COVMAP: section "__llvm_covfun", comdat - // COVMAP: section "__llvm_covfun", comdat - // COVMAP: @__llvm_coverage_mapping = {{.*}} { { i32, i32, i32, i32 } + // COVMAP: @__llvm_coverage_mapping = {{.*}} { { i32, i32, i32, i32 }, [5 x + // <{{.*}}>], }; int main() { |

