[clang] c9e9a7f - Revert "[Clang][NFC] Prevent lit tests from matching substrings in current path"

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 12 05:44:26 PST 2022


Author: Nikita Popov
Date: 2022-12-12T14:44:10+01:00
New Revision: c9e9a7f2fd4b41a842c74ce2a4bbaccf8a4559e5

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

LOG: Revert "[Clang][NFC] Prevent lit tests from matching substrings in current path"

This reverts commit bb48aa20e761e26226c6f909a07246781d68ba41.

Using placeholders inside CHECK-LABEL is not legal.

Added: 
    

Modified: 
    clang/test/CodeGenCXX/2004-01-11-DynamicInitializedConstant.cpp
    clang/test/CodeGenCXX/ignored-bitfield-conditional.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGenCXX/2004-01-11-DynamicInitializedConstant.cpp b/clang/test/CodeGenCXX/2004-01-11-DynamicInitializedConstant.cpp
index 9bbf16f55fab4..0c9333fb6d7a0 100644
--- a/clang/test/CodeGenCXX/2004-01-11-DynamicInitializedConstant.cpp
+++ b/clang/test/CodeGenCXX/2004-01-11-DynamicInitializedConstant.cpp
@@ -1,11 +1,6 @@
 // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
 
-// Catch the beginning and the end of the IR. This prevents the CHECK- from
-// matching a spurious "constant" string in file paths printed later.
-
-// CHECK-LABEL: target triple
 // CHECK-NOT: constant
-// CHECK-LABEL: attributes
 extern int X;
 const int Y = X;
 const int* foo() { return &Y; }

diff  --git a/clang/test/CodeGenCXX/ignored-bitfield-conditional.cpp b/clang/test/CodeGenCXX/ignored-bitfield-conditional.cpp
index c9880f91a5178..7700e97ae9d5c 100644
--- a/clang/test/CodeGenCXX/ignored-bitfield-conditional.cpp
+++ b/clang/test/CodeGenCXX/ignored-bitfield-conditional.cpp
@@ -7,7 +7,7 @@ struct S {
 };
 
 void use(bool cond, struct S s1, struct S s2, int val1, int val2) {
-  // CHECK-LABEL: define {{.*}}use{{.*}}(
+  // CHECK: define {{.*}}use{{.*}}(
   // CHECK: %[[S1:.+]] = alloca %struct.S
   // CHECK: %[[S2:.+]] = alloca %struct.S
   // CHECK: %[[COND:.+]] = alloca i8
@@ -43,7 +43,7 @@ void use(bool cond, struct S s1, struct S s2, int val1, int val2) {
   // CHECK: store i16 %[[BF_SET]], ptr %[[S1]]
   // CHECK: br label %[[END:.+]]
 
-  // CHECK-LABEL: [[END]]:
+  // CHECK: [[END]]:
   // There is nothing in the 'end' block associated with this, but it is the
   // 'continuation' block for the rest of the function.
 
@@ -77,7 +77,7 @@ void use(bool cond, struct S s1, struct S s2, int val1, int val2) {
   // CHECK: store i16 %[[BF_SET]], ptr %[[S2]]
   // CHECK: br label %[[END:.+]]
 
-  // CHECK-LABEL: [[END]]:
+  // CHECK: [[END]]:
   // CHECK-NOT: phi
   // There is nothing in the 'end' block associated with this, but it is the
   // 'continuation' block for the rest of the function.
@@ -86,7 +86,7 @@ void use(bool cond, struct S s1, struct S s2, int val1, int val2) {
 
 
 void use2(bool cond1, bool cond2, struct S s1, int val1, int val2, int val3) {
-  // CHECK-LABEL: define {{.*}}use2{{.*}}(
+  // CHECK: define {{.*}}use2{{.*}}(
   // CHECK: %[[S1:.+]] = alloca %struct.S
   // CHECK: %[[COND1:.+]] = alloca i8
   // CHECK: %[[COND2:.+]] = alloca i8
@@ -141,10 +141,7 @@ void use2(bool cond1, bool cond2, struct S s1, int val1, int val2, int val3) {
   // CHECK: store i16 %[[BF_SET]], ptr %[[S1]]
   // CHECK: br label %[[END:.+]]
 
-  // CHECK-LABEL: [[END]]:
+  // CHECK[[END]]:
   // CHECK-NOT: phi
   // Nothing left to do here.
 }
-// Catch the end of the IR. This prevents the CHECK-NOT above from matching a
-// spurious "phi" in file paths printed later.
-// CHECK-LABEL: attributes


        


More information about the cfe-commits mailing list