[PATCH] D76851: [lld][ELF][test] Improve deplib.s
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 02:10:30 PDT 2020
grimar accepted this revision.
grimar added a comment.
LGTM. Have a suggestion inlined though.
================
Comment at: lld/test/ELF/deplibs.s:64
+# PLAIN-DIR-NEXT: [[DIR]]{{[\\/]}}foo.a
+# LIBA-DIR-NEXT: [[DIR]]{{[\\/]}}libfoo.a.a
----------------
To me it looks a bit overcomplicated to use `--check-prefixes` here. The `COMMON` part is just a single line,
but having `--check-prefixes=COMMON,CWD`, `--check-prefixes=COMMON,PLAIN-DIR` and `--check-prefixes=COMMON,LIBA-DIR`
seems reads slightly harder than the following:
```
# RUN: ld.lld %t.o -o /dev/null -L %t.dir --trace 2>&1 | \
# RUN: FileCheck %s -DOBJ=%t.o -DDIR=%t.dir --check-prefix=CWD \
# RUN: --implicit-check-not=foo.a --implicit-check-not=libbar.so
# CWD: [[OBJ]]
# CWD-NEXT: {{^foo\.a}}
# RUN: rm %t.cwd/foo.a
# RUN: ld.lld %t.o -o /dev/null -L %t.dir --trace 2>&1 | \
# RUN: FileCheck %s -DOBJ=%t.o -DDIR=%t.dir --check-prefix=PLAIN-DIR \
# RUN: --implicit-check-not=foo.a --implicit-check-not=libbar.so
# PLAIN-DIR: [[OBJ]]
# PLAIN-DIR-NEXT: {{^foo\.a}}
# RUN: rm %t.dir/foo.a
# RUN: ld.lld %t.o -o /dev/null -L %t.dir --trace 2>&1 | \
# RUN: FileCheck %s -DOBJ=%t.o -DDIR=%t.dir --check-prefix=LIBA-DIR \
# RUN: --implicit-check-not=foo.a --implicit-check-not=libbar.so
# LIBA-DIR: [[OBJ]]
# LIBA-DIR-NEXT: {{^foo\.a}}
```
Up to you probably.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76851/new/
https://reviews.llvm.org/D76851
More information about the llvm-commits
mailing list