[PATCH] D108151: [NFC][clang] Use X86 Features declaration from X86TargetParser
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 19 07:39:57 PDT 2021
craig.topper added inline comments.
================
Comment at: clang/lib/Basic/Targets/X86.cpp:1061
static unsigned getFeaturePriority(llvm::X86::ProcessorFeatures Feat) {
- enum class FeatPriority {
-#define FEATURE(FEAT) FEAT,
-#include "clang/Basic/X86Target.def"
+ // Check that priorites are set properly in the .def file.
+#define X86_FEATURE_COMPAT(ENUM, STR, PRIORITY) PRIORITY,
----------------
priorites -> priorities
================
Comment at: clang/lib/Basic/Targets/X86.cpp:1067
};
+ (void)Priorities;
+ for (unsigned Priority = 0;
----------------
Maybe just wrap this all in #ifndef NDEBUG?
================
Comment at: clang/lib/Basic/Targets/X86.cpp:1069
+ for (unsigned Priority = 0;
+ Priority < sizeof(Priorities) / sizeof(unsigned) - 1; ++Priority) {
+ assert(llvm::is_contained(Priorities, Priority) &&
----------------
array_lengthof(Priorities) - 1
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