Skip to content

Commit

Permalink
[clang] NFC: Robustify sret test regex
Browse files Browse the repository at this point in the history
Replace old-style, brittle, grep with new-fangled FileCheck technology.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D137941
  • Loading branch information
urnathan committed Nov 21, 2022
1 parent 163bb6d commit eff9d72
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
10 changes: 8 additions & 2 deletions clang/test/CodeGen/sret.c
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 %s -Wno-strict-prototypes -emit-llvm -o - | grep sret | grep -v 'sret.c' | count 4
// RUN: %clang_cc1 %s -Wno-strict-prototypes -emit-llvm -o - | FileCheck %s

struct abc {
long a;
Expand All @@ -7,11 +7,17 @@ struct abc {
long d;
long e;
};

struct abc foo1(void);
// CHECK-DAG: declare {{.*}} @foo1(ptr sret(%struct.abc)
struct abc foo2();
// CHECK-DAG: declare {{.*}} @foo2(ptr sret(%struct.abc)
struct abc foo3(void){}
// CHECK-DAG: define {{.*}} @foo3(ptr noalias sret(%struct.abc)

void bar(void) {
struct abc dummy1 = foo1();
// CHECK-DAG: call {{.*}} @foo1(ptr sret(%struct.abc)
struct abc dummy2 = foo2();
// CHECK-DAG: call {{.*}} @foo2(ptr sret(%struct.abc)
}
11 changes: 0 additions & 11 deletions clang/test/CodeGen/sret2.c

This file was deleted.

0 comments on commit eff9d72

Please sign in to comment.