[PATCH] D146054: [RISCV] Add --print-supported-extensions support

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 18 11:02:22 PDT 2023


MaskRay requested changes to this revision.
MaskRay added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/test/Driver/print-supported-extensions.c:1
+// Test that --print-supported-extensions lists supported extensions.
+
----------------
Some newer tests use `///` to distinguish non-CHECK-non-RUN comments from others. This helps automation tools to catch wrong prefixes (e.g. with a typo) in comments and helps auto-generating checks in the future while retaining manual comments.


================
Comment at: clang/test/Driver/print-supported-extensions.c:3
+
+// REQUIRES: riscv-registered-target
+
----------------
If you remove `all` and `RISCV` from `LLVM_TARGETS_TO_BUILD`, you can test whether this feature works without lib/Target/RISCV support. I suspect it works, so you may need another build for verification.


================
Comment at: clang/test/Driver/print-supported-extensions.c:10
+// CHECK-RISCV: Target: riscv64
+// CHECK-NEXT: All available -march extensions for RISC-V
+// CHECK-NEXT: 	Name                Version
----------------
The formatting matters here. To test formatting see `--strict-whitespace --match-full-lines` (example: See `llvm/test/tools/llvm-readobj/ELF/gnu-sections.txt`): https://llvm.org/docs/CommandGuide/FileCheck.html


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146054/new/

https://reviews.llvm.org/D146054



More information about the cfe-commits mailing list