[PATCH] D42978: Make march/target-cpu print a note with the list of valid values for ARM

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 8 10:36:14 PST 2018


erichkeane added inline comments.


================
Comment at: test/Misc/target-invalid-cpu-note.c:1
+// RUN: not %clang_cc1 -triple armv5--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix ARM
+// ARM: error: unknown target CPU 'not-a-cpu'
----------------
Hahnfeld wrote:
> Is there a reason you don't use `-verify=<prefix>` in this test? That's what I've usually seen for checking errors and notes...
Um... wow... TIL.


================
Comment at: test/Misc/target-invalid-cpu-note.c:3
+// ARM: error: unknown target CPU 'not-a-cpu'
+// ARM: note: valid target CPU values are: arm2,
+
----------------
Hahnfeld wrote:
> Is this guaranteed to be first? If not, you might want to add `{{.*}}` to account for future updates.
> 
> (If not using `-verify` as suggested above, you could also use `ARM-SAME` on a new-line. This should also allow arbitrary values in between.)
Not guaranteed.  I'll do this, thanks!


https://reviews.llvm.org/D42978





More information about the cfe-commits mailing list