[NFC][tests] Replace non-portable grep with FileCheck

After commit 2482648a79, a GNU grep option
is just passed unconditionally to `grep` in general. This patch fixes
the test for platforms where `grep` is not GNU grep.
This commit is contained in:
Hubert Tong 2020-11-24 12:14:03 -05:00
parent a248eca665
commit 44174b3d51
1 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,7 @@
; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t.o -x ir %t1.bc -c -fthinlto-index=%t.o.thinlto.bc -mllvm -lto-embed-bitcode=post-merge-pre-opt
; RUN: llvm-readelf -S %t.o | FileCheck %s --check-prefixes=CHECK-ELF,CHECK-ELF-CMD
; RUN: llvm-objcopy --dump-section=.llvmcmd=%t-embedded.cmd %t.o /dev/null
; RUN: grep --text x86_64-unknown-linux-gnu %t-embedded.cmd | count 1
; RUN: FileCheck %s --check-prefixes=CHECK-EMBEDDED-CMD <%t-embedded.cmd
; RUN: llvm-objcopy --dump-section=.llvmbc=%t-embedded.bc %t.o /dev/null
; RUN: llvm-dis %t-embedded.bc -o - | FileCheck %s --check-prefixes=CHECK,CHECK-NOOPT
; We should only need the index and the post-thinlto merged module to generate
@ -43,3 +43,6 @@
; CHECK-NOOPT-NEXT: call void @bar()
; CHECK-NOOPT: define available_externally void @bar()
; CHECK-NOOPT-NEXT: ret void
; CHECK-EMBEDDED-CMD: x86_64-unknown-linux-gnu{{.*$}}
; CHECK-EMBEDDED-CMD-NOT: x86_64-unknown-linux-gnu