[PATCH] D108151: [NFC][clang] Use X86 Features declaration from X86TargetParser

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 23 09:31:12 PDT 2021


erichkeane accepted this revision.
erichkeane added a comment.
This revision is now accepted and ready to land.

2 nits, give Craig a day or two to =1 as well please, particularly since he's the code-owner here.



================
Comment at: clang/lib/Basic/Targets/X86.cpp:1063
+#ifndef NDEBUG
+  // Check that priorities are set properly in the .def file, i.e.
+#define X86_FEATURE_COMPAT(ENUM, STR, PRIORITY) PRIORITY,
----------------
Just a nit, I would like a better description here of the constraint we're trying to enforce.  I can imagine someone in the future failing this, and not getting the context without a few sentences of how no duplicates are allowed, and it must be all numbers from 0 to the-max-number.


================
Comment at: clang/lib/Basic/Targets/X86.cpp:1074
+                             std::prev(std::end(Priorities))) &&
+         "Priorites don't form consecutive range!");
+#endif
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108151



More information about the cfe-commits mailing list