Skip to content

Commit c5d1983

Browse files
committed
Update tests to use FileCheck instead of grep (which is deprecated in the LLVM regression suite)
BUG=None [email protected] Review URL: https://codereview.chromium.org/15042009
1 parent 8fe6f1f commit c5d1983

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

test/Transforms/NaCl/expand-ctors-empty.ll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; Currently we do not define __{init,fini}_array_end as named aliases.
2-
; RUN: opt < %s -nacl-expand-ctors -S | not grep __init_array_end
3-
; RUN: opt < %s -nacl-expand-ctors -S | not grep __fini_array_end
2+
; RUN: opt < %s -nacl-expand-ctors -S | FileCheck %s -check-prefix=NO_CTORS
3+
; NO_CTORS-NOT: __init_array_end
4+
; NO_CTORS-NOT: __fini_array_end
45

56
; RUN: opt < %s -nacl-expand-ctors -S | FileCheck %s
67

test/Transforms/NaCl/expand-ctors-zeroinit.ll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; Currently we do not define __{init,fini}_array_end as named aliases.
2-
; RUN: opt < %s -nacl-expand-ctors -S | not grep __init_array_end
3-
; RUN: opt < %s -nacl-expand-ctors -S | not grep __fini_array_end
2+
; RUN: opt < %s -nacl-expand-ctors -S | FileCheck %s -check-prefix=NO_CTORS
3+
; NO_CTORS-NOT: __init_array_end
4+
; NO_CTORS-NOT: __fini_array_end
45

56
; We expect this symbol to be removed:
67
; RUN: opt < %s -nacl-expand-ctors -S | not grep llvm.global_ctors

test/Transforms/NaCl/expand-ctors.ll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
; We expect these symbol names to be removed:
2-
; RUN: opt < %s -nacl-expand-ctors -S | not grep llvm.global_ctors
3-
; RUN: opt < %s -nacl-expand-ctors -S | not grep __init_array_end
4-
; RUN: opt < %s -nacl-expand-ctors -S | not grep __fini_array_end
2+
; RUN: opt < %s -nacl-expand-ctors -S | FileCheck %s -check-prefix=NO_CTORS
3+
; NO_CTORS-NOT: llvm.global.ctors
4+
; NO_CTORS-NOT: __init_array_end
5+
; NO_CTORS-NOT: __fini_array_end
56

67
; RUN: opt < %s -nacl-expand-ctors -S | FileCheck %s
78

test/Transforms/NaCl/expand-tls.ll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
; RUN: opt < %s -nacl-expand-tls -S | FileCheck %s
22

33
; All thread-local variables should be removed
4-
; RUN: opt < %s -nacl-expand-tls -S | not grep thread_local
4+
; RUN: opt < %s -nacl-expand-tls -S | FileCheck %s -check-prefix=NO_TLS
55

6+
; NO_TLS-NOT: thread_local
67

78
@tvar1 = thread_local global i64 123
89
@tvar2 = thread_local global i32 456
@@ -73,7 +74,7 @@ define i32 @test_get_tp_tls_offset(i32 %tls_size) {
7374
; Uses of the intrinsic are replaced with uses of a regular function.
7475
; CHECK: define i32 @test_get_tp_tls_offset
7576
; CHECK: call i32 @nacl_tp_tls_offset
76-
; RUN: opt < %s -nacl-expand-tls -S | not grep llvm.nacl.tp.tls.offset
77+
; NO_TLS-NOT: llvm.nacl.tp.tls.offset
7778

7879
define i32 @test_get_tp_tdb_offset(i32 %tdb_size) {
7980
%offset = call i32 @llvm.nacl.tp.tdb.offset(i32 %tdb_size)
@@ -82,4 +83,4 @@ define i32 @test_get_tp_tdb_offset(i32 %tdb_size) {
8283
; Uses of the intrinsic are replaced with uses of a regular function.
8384
; CHECK: define i32 @test_get_tp_tdb_offset
8485
; CHECK: call i32 @nacl_tp_tdb_offset
85-
; RUN: opt < %s -nacl-expand-tls -S | not grep llvm.nacl.tp.tdb.offset
86+
; NO_TLS-NOT: llvm.nacl.tp.tdb.offset

0 commit comments

Comments
 (0)