[compiler-rt] 36ba86f - [profile][test] Improve coverage-linkage.cpp
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 5 12:46:12 PDT 2021
Author: Fangrui Song
Date: 2021-07-05T12:46:06-07:00
New Revision: 36ba86fe8a29cdf3251b786db7f342efde666cb2
URL: https://github.com/llvm/llvm-project/commit/36ba86fe8a29cdf3251b786db7f342efde666cb2
DIFF: https://github.com/llvm/llvm-project/commit/36ba86fe8a29cdf3251b786db7f342efde666cb2.diff
LOG: [profile][test] Improve coverage-linkage.cpp
Added:
Modified:
compiler-rt/test/profile/Linux/coverage-linkage.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/profile/Linux/coverage-linkage.cpp b/compiler-rt/test/profile/Linux/coverage-linkage.cpp
index 32a63fb000955..df0674ec0329f 100644
--- a/compiler-rt/test/profile/Linux/coverage-linkage.cpp
+++ b/compiler-rt/test/profile/Linux/coverage-linkage.cpp
@@ -1,9 +1,32 @@
/// Test instrumentation can handle various linkages.
// RUN: %clang_profgen -fcoverage-mapping %s -o %t
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
+// RUN: llvm-profdata show %t.profraw --all-functions | FileCheck %s
// RUN: %clang_profgen -fcoverage-mapping -ffunction-sections -Wl,--gc-sections %s -o %t
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
+// RUN: llvm-profdata show %t.profraw --all-functions | FileCheck %s
+
+// CHECK: {{.*}}external{{.*}}:
+// CHECK-NEXT: Hash:
+// CHECK-NEXT: Counters: 1
+// CHECK-NEXT: Function count: 1
+// CHECK: {{.*}}weak{{.*}}:
+// CHECK-NEXT: Hash:
+// CHECK-NEXT: Counters: 1
+// CHECK-NEXT: Function count: 1
+// CHECK: main:
+// CHECK-NEXT: Hash:
+// CHECK-NEXT: Counters: 1
+// CHECK-NEXT: Function count: 1
+// CHECK: {{.*}}internal{{.*}}:
+// CHECK-NEXT: Hash:
+// CHECK-NEXT: Counters: 1
+// CHECK-NEXT: Function count: 1
+// CHECK: {{.*}}linkonce_odr{{.*}}:
+// CHECK-NEXT: Hash:
+// CHECK-NEXT: Counters: 1
+// CHECK-NEXT: Function count: 1
#include <stdio.h>
More information about the llvm-commits
mailing list