r295101 - [profiling] Update test cases to deal with name variable change (NFC)

Vedant Kumar via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 14 12:03:56 PST 2017


Author: vedantk
Date: Tue Feb 14 14:03:56 2017
New Revision: 295101

URL: http://llvm.org/viewvc/llvm-project?rev=295101&view=rev
Log:
[profiling] Update test cases to deal with name variable change (NFC)

This is a re-try of r295085: fix up some test cases that assume that
profile name variables are preserved by the instrprof pass.

This catches one additional case in test/CoverageMapping/unused_names.c.

Modified:
    cfe/trunk/test/CoverageMapping/unused_names.c
    cfe/trunk/test/Profile/cxx-virtual-destructor-calls.cpp

Modified: cfe/trunk/test/CoverageMapping/unused_names.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CoverageMapping/unused_names.c?rev=295101&r1=295100&r2=295101&view=diff
==============================================================================
--- cfe/trunk/test/CoverageMapping/unused_names.c (original)
+++ cfe/trunk/test/CoverageMapping/unused_names.c Tue Feb 14 14:03:56 2017
@@ -2,14 +2,15 @@
 // RUN: FileCheck -input-file %t %s
 // RUN: FileCheck -check-prefix=SYSHEADER -input-file %t %s
 
-// Since foo is never emitted, there should not be a profile name for it.
-
-// CHECK-DAG: @__profn_bar = {{.*}} [3 x i8] c"bar"
-// CHECK-DAG: @__profn_baz = {{.*}} [3 x i8] c"baz"
-// CHECK-DAG: @__profn_unused_names.c_qux = {{.*}} [18 x i8] c"unused_names.c:qux"
+// CHECK-DAG: @__profc_bar
 // CHECK-DAG: @__llvm_prf_nm = private constant {{.*}}, section "{{.*}}__llvm_prf_names"
 
-// SYSHEADER-NOT: @__profn_foo =
+// These are never instantiated, so we shouldn't get counters for them.
+//
+// CHECK-NOT: @__profc_baz
+// CHECK-NOT: @__profc_unused_names.c_qux
+
+// SYSHEADER-NOT: @__profc_foo =
 
 
 #ifdef IS_SYSHEADER

Modified: cfe/trunk/test/Profile/cxx-virtual-destructor-calls.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Profile/cxx-virtual-destructor-calls.cpp?rev=295101&r1=295100&r2=295101&view=diff
==============================================================================
--- cfe/trunk/test/Profile/cxx-virtual-destructor-calls.cpp (original)
+++ cfe/trunk/test/Profile/cxx-virtual-destructor-calls.cpp Tue Feb 14 14:03:56 2017
@@ -13,15 +13,6 @@ struct B : A {
   virtual ~B();
 };
 
-// Base dtor
-// CHECK: @__profn__ZN1BD2Ev = private constant [9 x i8] c"_ZN1BD2Ev"
-
-// Complete dtor must not be instrumented
-// CHECK-NOT: @__profn__ZN1BD1Ev = private constant [9 x i8] c"_ZN1BD1Ev"
-
-// Deleting dtor must not be instrumented
-// CHECK-NOT: @__profn__ZN1BD0Ev = private constant [9 x i8] c"_ZN1BD0Ev"
-
 // Base dtor counters and profile data
 // CHECK: @__profc__ZN1BD2Ev = private global [1 x i64] zeroinitializer
 // CHECK: @__profd__ZN1BD2Ev =




More information about the cfe-commits mailing list