[clang] 183d075 - [BPF][Clang] Fix func argument pattern in bpf-stack-protector test

Yonghong Song via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 21 22:36:05 PST 2023


Author: Yonghong Song
Date: 2023-01-21T22:33:15-08:00
New Revision: 183d075055c591dedead7ece972f1bdea611aa3b

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

LOG: [BPF][Clang] Fix func argument pattern in bpf-stack-protector test

Commit 56b038f887f3("[BPF][clang] Ignore stack protector options for BPF
target") added a test for its corresponding functionality.
Douglas Yung found that the test will fail with the release build
buildbot due to different func argument patterns (from %msg
to %0). This patch fixed the issue by using pattern [0-9a-z]+
which allows both %msg and %0.

Added: 
    

Modified: 
    clang/test/CodeGen/bpf-stack-protector.c

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/bpf-stack-protector.c b/clang/test/CodeGen/bpf-stack-protector.c
index a005bb96ff1ed..c17af890eac23 100644
--- a/clang/test/CodeGen/bpf-stack-protector.c
+++ b/clang/test/CodeGen/bpf-stack-protector.c
@@ -24,7 +24,7 @@ char *strcpy(char *s1, const char *s2);
 //      STRONG: warning: ignoring '-fstack-protector-strong'
 // COMMON-SAME: option as it is not currently supported for target 'bpf'
 
-// COMMON: define {{.*}}void @test1(ptr noundef %msg) #[[A:.*]] {
+// COMMON: define {{.*}}void @test1(ptr noundef %{{[0-9a-z]+}}) #[[A:.*]] {
 void test1(const char *msg) {
   char a[strlen(msg) + 1];
   strcpy(a, msg);


        


More information about the cfe-commits mailing list