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

Florian Hahn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 7 01:44:54 PST 2018


fhahn added a reviewer: rengolin.
fhahn added a comment.

I like the idea. However for all backends, except Arm and AArch64, we would have to maintain another list of CPU names. At least for the targets which implement `isValidCPUName`, we could add an array with valid names and use that.  That's still not ideal, but I do not think we should hold back this patch until all targets use the same infrastructure to handle CPUs. As for tests, we should test the note for all backends I think.



================
Comment at: test/Misc/target-parser.c:3
 // CHECK: error: unknown target CPU 'not-a-cpu'
+// //CHECK: note: valid target CPU values are:
----------------
drop one set of //


Repository:
  rC Clang

https://reviews.llvm.org/D42978





More information about the cfe-commits mailing list