[clang] 16f3401 - [Coverage] Fix test failures from commit rG9f2967bcfe2f

Alan Phipps via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 5 11:36:09 PST 2021


Author: Alan Phipps
Date: 2021-01-05T13:35:52-06:00
New Revision: 16f3401eae4310c95163269c41d9b45261f0c7c3

URL: https://github.com/llvm/llvm-project/commit/16f3401eae4310c95163269c41d9b45261f0c7c3
DIFF: https://github.com/llvm/llvm-project/commit/16f3401eae4310c95163269c41d9b45261f0c7c3.diff

LOG: [Coverage] Fix test failures from commit rG9f2967bcfe2f

Fix test failures with Branch Coverage tests from commit rG9f2967bcfe2f
that failed build on builder clang-x64-windows-msvc while building llvm:
    http://lab.llvm.org:8011/#builders/123/builds/2155

Added: 
    

Modified: 
    clang/test/CoverageMapping/branch-constfolded.cpp
    clang/test/CoverageMapping/branch-macros.cpp
    clang/test/CoverageMapping/branch-mincounters.cpp
    clang/test/CoverageMapping/branch-templates.cpp
    clang/test/Profile/branch-logical-mixed.cpp
    clang/test/Profile/branch-profdup.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/CoverageMapping/branch-constfolded.cpp b/clang/test/CoverageMapping/branch-constfolded.cpp
index bb7c675e3ef7..5173286addbb 100644
--- a/clang/test/CoverageMapping/branch-constfolded.cpp
+++ b/clang/test/CoverageMapping/branch-constfolded.cpp
@@ -1,6 +1,6 @@
 // Test that branch regions are not generated for constant-folded conditions.
 
-// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name branch-constfolded.cpp %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name branch-constfolded.cpp %s | FileCheck %s
 
 // CHECK-LABEL: _Z6fand_0b:
 bool fand_0(bool a) {

diff  --git a/clang/test/CoverageMapping/branch-macros.cpp b/clang/test/CoverageMapping/branch-macros.cpp
index d5bc47fbef76..0f9ae791a355 100644
--- a/clang/test/CoverageMapping/branch-macros.cpp
+++ b/clang/test/CoverageMapping/branch-macros.cpp
@@ -1,7 +1,7 @@
 // Test that branch regions are generated for conditions in nested macro
 // expansions.
 
-// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name branch-macros.cpp %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name branch-macros.cpp %s | FileCheck %s
 
 #define COND1 (a == b)
 #define COND2 (a != b)

diff  --git a/clang/test/CoverageMapping/branch-mincounters.cpp b/clang/test/CoverageMapping/branch-mincounters.cpp
index 68e691684970..6d4341cbeafd 100644
--- a/clang/test/CoverageMapping/branch-mincounters.cpp
+++ b/clang/test/CoverageMapping/branch-mincounters.cpp
@@ -1,7 +1,7 @@
 // Test to ensure right number of counters are allocated and used for nested
 // logical operators on branch conditions for branch coverage.
 
-// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name branch-logical-mixed.cpp %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name branch-logical-mixed.cpp %s | FileCheck %s
 
 
 // CHECK-LABEL: _Z5func1ii:

diff  --git a/clang/test/CoverageMapping/branch-templates.cpp b/clang/test/CoverageMapping/branch-templates.cpp
index 9e312df9b2de..1fd01218c903 100644
--- a/clang/test/CoverageMapping/branch-templates.cpp
+++ b/clang/test/CoverageMapping/branch-templates.cpp
@@ -1,7 +1,7 @@
 // Test that branch regions are generated for conditions in function template
 // instantiations.
 
-// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name branch-templates.cpp %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name branch-templates.cpp %s | FileCheck %s
 
 template<typename T>
 void unused(T x) {

diff  --git a/clang/test/Profile/branch-logical-mixed.cpp b/clang/test/Profile/branch-logical-mixed.cpp
index e6f546d3ac4b..cbfcf061f152 100644
--- a/clang/test/Profile/branch-logical-mixed.cpp
+++ b/clang/test/Profile/branch-logical-mixed.cpp
@@ -1,7 +1,7 @@
 // Test to ensure instrumentation of logical operator RHS True/False counters
 // are being instrumented for branch coverage
 
-// RUN: %clang_cc1 -main-file-name branch-logical-mixed.cpp %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck -allow-deprecated-dag-overlap %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -main-file-name branch-logical-mixed.cpp %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck -allow-deprecated-dag-overlap %s
 
 
 // CHECK: @[[FUNC:__profc__Z4funcv]] = private global [61 x i64] zeroinitializer

diff  --git a/clang/test/Profile/branch-profdup.cpp b/clang/test/Profile/branch-profdup.cpp
index 09c08c59d015..dfb3f5738fb7 100644
--- a/clang/test/Profile/branch-profdup.cpp
+++ b/clang/test/Profile/branch-profdup.cpp
@@ -1,7 +1,7 @@
 // Test to ensure RHS condition of logical operators isn't evaluated more than
 // one time when instrumenting RHS counter blocks for branch coverage.
 
-// RUN: %clang_cc1 -main-file-name branch-profdup.cpp %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck -allow-deprecated-dag-overlap %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -main-file-name branch-profdup.cpp %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck -allow-deprecated-dag-overlap %s
 
 // CHECK-LABEL: define {{.*}}@_Z5test1b
 // CHECK-COUNT-1: = call {{.*}}@_Z5fval1v()


        


More information about the cfe-commits mailing list