Author: Yonghong Song
Date: 2019-11-13T09:40:57-08:00
New Revision: 1583158042a7e1f8b4f5194b1db362328e6902f3

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

LOG: [BPF] fix clang test failure for bpf-attr-preserve-access-index-4.c

Depending on different cmake configures, clang may generate different
IR name for slot variables. Let us use the regex instead of hard
coding the name. I did the same for other bpf-attr-preserve-access-index
tests with such an approach, but somehow did not do for this one.

Added: 
    

Modified: 
    clang/test/CodeGen/bpf-attr-preserve-access-index-4.c

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/bpf-attr-preserve-access-index-4.c 
b/clang/test/CodeGen/bpf-attr-preserve-access-index-4.c
index 5ec56d96de18..49930996e306 100644
--- a/clang/test/CodeGen/bpf-attr-preserve-access-index-4.c
+++ b/clang/test/CodeGen/bpf-attr-preserve-access-index-4.c
@@ -27,7 +27,7 @@ int test(__s3 *arg) {
 
 // CHECK: define dso_local i32 @test
 // CHECK-NOT: call %struct.s2* 
@llvm.preserve.struct.access.index.p0s_struct.s2s.p0s_struct.s3s
-// CHECK: call %union.anon* 
@llvm.preserve.struct.access.index.p0s_union.anons.p0s_struct.s2s(%struct.s2* 
%a, i32 0, i32 0)
-// CHECK: call %union.anon* 
@llvm.preserve.union.access.index.p0s_union.anons.p0s_union.anons(%union.anon* 
%1, i32 0)
-// CHECK: call %struct.s1* 
@llvm.preserve.array.access.index.p0s_struct.s1s.p0a3s_struct.s1s([3 x 
%struct.s1]* %b, i32 1, i32 2)
+// CHECK: call %union.anon* 
@llvm.preserve.struct.access.index.p0s_union.anons.p0s_struct.s2s(%struct.s2* 
%{{[0-9a-z]+}}, i32 0, i32 0)
+// CHECK: call %union.anon* 
@llvm.preserve.union.access.index.p0s_union.anons.p0s_union.anons(%union.anon* 
%{{[0-9a-z]+}}, i32 0)
+// CHECK: call %struct.s1* 
@llvm.preserve.array.access.index.p0s_struct.s1s.p0a3s_struct.s1s([3 x 
%struct.s1]* %{{[0-9a-z]+}}, i32 1, i32 2)
 // CHECK-NOT: call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to