[PATCH] D83834: Add test utility 'extract'
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 17 03:24:27 PDT 2020
grimar added inline comments.
================
Comment at: llvm/test/tools/extract/basic.s:2
+# REQUIRES: x86-registered-target
+# RUN: extract aa %s | llvm-mc -triple=x86_64 - 2>&1 | \
+# RUN: FileCheck %s --check-prefix=AA --implicit-check-not='warning: bb'
----------------
MaskRay wrote:
> jhenderson wrote:
> > Do you actually need to use llvm-mc at all? It seems a bit heavy duty. You could just use `FileCheck` directly on the output of `extract`, e.g.
> >
> > ```
> > # RUN: extract aa %s | FileCheck %s --check-prefix=AA --implicit-check-not=bb
> > ...
> >
> > # AA: {{^}}aa{{$}}
> >
> > #--- aa
> > aa
> > ```
> >
> > I suppose that doesn't cover the line numbering, but perhaps that should be a different test?
> I suppose the only problem is `# REQUIRES: x86-registered-target` but this is the simplest tool (I can find) which can print line number information, and we do need to test several forms and ensure each form can get correct line numbers.
>
> If you have suggestion for another tool without a need to add `# REQUIRES: x86-registered-target`, I'd happily change. But I'd prefer sticking with llvm-mc otherwise.
Perhaps, you could use the LLVM`s `count` tool to count the number of lines?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83834/new/
https://reviews.llvm.org/D83834
More information about the llvm-commits
mailing list