[llvm] 7c02776 - Fix edb02d8c5df36bb375df7171b4ba61635564dfb4

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 26 02:09:08 PST 2022


Author: serge-sans-paille
Date: 2022-01-26T11:08:42+01:00
New Revision: 7c02776567cc9561e6691dc05235799da45e72d6

URL: https://github.com/llvm/llvm-project/commit/7c02776567cc9561e6691dc05235799da45e72d6
DIFF: https://github.com/llvm/llvm-project/commit/7c02776567cc9561e6691dc05235799da45e72d6.diff

LOG: Fix edb02d8c5df36bb375df7171b4ba61635564dfb4

Added: 
    

Modified: 
    llvm/lib/Support/CommandLine.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index b1e688788c33..71a6ebf2a72e 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -2356,7 +2356,7 @@ class CategorizedHelpPrinter : public HelpPrinter {
     for (size_t I = 0, E = Opts.size(); I != E; ++I) {
       Option *Opt = Opts[I].second;
       for (auto &Cat : Opt->Categories) {
-        assert(std::binary_search(SortedCategories.begin(), SortedCategories.end(), Cat, [](OptionCategory* A, OptionCategory* B) { return OptionCategoryCompare(&A, &B);}) &&
+        assert(find(SortedCategories, Cat) != SortedCategories.end() &&
                "Option has an unregistered category");
         CategorizedOptions[Cat].push_back(Opt);
       }


        


More information about the llvm-commits mailing list