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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 19 07:48:26 PDT 2021


craig.topper added inline comments.


================
Comment at: clang/lib/Basic/Targets/X86.cpp:1071
+    assert(llvm::is_contained(Priorities, Priority) &&
+           "Priorites don't form consequtive range!");
+  }
----------------
erichkeane wrote:
> If all you care about is whether they are a consecutive range, why not just use `std::is_sorted`?
The Priorities array isn't sorted. It's just whatever order the X86_FEATURE_COMPAT lists them.

The values need to be unique and in a contiguous range.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108151



More information about the llvm-commits mailing list