[libc++] Implement ranges::lexicographical_compare

Reviewed By: var-const, Mordante, #libc

Spies: H-G-Hristov, sstefan1, libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D127130

NOKEYCHECK=True
GitOrigin-RevId: afd5a4f2dcd6674d2a09a97bc23475ed745ade89
diff --git a/include/module.modulemap.in b/include/module.modulemap.in
index ab79cf7..27cb165 100644
--- a/include/module.modulemap.in
+++ b/include/module.modulemap.in
@@ -238,144 +238,145 @@
     export *
 
     module __algorithm {
-      module adjacent_find            { private header "__algorithm/adjacent_find.h" }
-      module all_of                   { private header "__algorithm/all_of.h" }
-      module any_of                   { private header "__algorithm/any_of.h" }
-      module binary_search            { private header "__algorithm/binary_search.h" }
-      module clamp                    { private header "__algorithm/clamp.h" }
-      module comp                     { private header "__algorithm/comp.h" }
-      module comp_ref_type            { private header "__algorithm/comp_ref_type.h" }
-      module copy                     { private header "__algorithm/copy.h" }
-      module copy_backward            { private header "__algorithm/copy_backward.h" }
-      module copy_if                  { private header "__algorithm/copy_if.h" }
-      module copy_n                   { private header "__algorithm/copy_n.h" }
-      module count                    { private header "__algorithm/count.h" }
-      module count_if                 { private header "__algorithm/count_if.h" }
-      module equal                    { private header "__algorithm/equal.h" }
-      module equal_range              { private header "__algorithm/equal_range.h" }
-      module fill                     { private header "__algorithm/fill.h" }
-      module fill_n                   { private header "__algorithm/fill_n.h" }
-      module find                     { private header "__algorithm/find.h" }
-      module find_end                 { private header "__algorithm/find_end.h" }
-      module find_first_of            { private header "__algorithm/find_first_of.h" }
-      module find_if                  { private header "__algorithm/find_if.h" }
-      module find_if_not              { private header "__algorithm/find_if_not.h" }
-      module for_each                 { private header "__algorithm/for_each.h" }
-      module for_each_n               { private header "__algorithm/for_each_n.h" }
-      module generate                 { private header "__algorithm/generate.h" }
-      module generate_n               { private header "__algorithm/generate_n.h" }
-      module half_positive            { private header "__algorithm/half_positive.h" }
-      module in_found_result          { private header "__algorithm/in_found_result.h" }
-      module in_fun_result            { private header "__algorithm/in_fun_result.h" }
-      module in_in_out_result         { private header "__algorithm/in_in_out_result.h" }
-      module in_in_result             { private header "__algorithm/in_in_result.h" }
-      module in_out_out_result        { private header "__algorithm/in_out_out_result.h" }
-      module in_out_result            { private header "__algorithm/in_out_result.h" }
-      module includes                 { private header "__algorithm/includes.h" }
-      module inplace_merge            { private header "__algorithm/inplace_merge.h" }
-      module is_heap                  { private header "__algorithm/is_heap.h" }
-      module is_heap_until            { private header "__algorithm/is_heap_until.h" }
-      module is_partitioned           { private header "__algorithm/is_partitioned.h" }
-      module is_permutation           { private header "__algorithm/is_permutation.h" }
-      module is_sorted                { private header "__algorithm/is_sorted.h" }
-      module is_sorted_until          { private header "__algorithm/is_sorted_until.h" }
-      module iter_swap                { private header "__algorithm/iter_swap.h" }
-      module iterator_operations      { private header "__algorithm/iterator_operations.h" }
-      module lexicographical_compare  { private header "__algorithm/lexicographical_compare.h" }
-      module lower_bound              { private header "__algorithm/lower_bound.h" }
-      module make_heap                { private header "__algorithm/make_heap.h" }
-      module max                      { private header "__algorithm/max.h" }
-      module max_element              { private header "__algorithm/max_element.h" }
-      module merge                    { private header "__algorithm/merge.h" }
-      module min                      { private header "__algorithm/min.h" }
-      module min_element              { private header "__algorithm/min_element.h" }
-      module min_max_result           { private header "__algorithm/min_max_result.h" }
-      module minmax                   { private header "__algorithm/minmax.h" }
-      module minmax_element           { private header "__algorithm/minmax_element.h" }
-      module mismatch                 { private header "__algorithm/mismatch.h" }
-      module move                     { private header "__algorithm/move.h" }
-      module move_backward            { private header "__algorithm/move_backward.h" }
-      module next_permutation         { private header "__algorithm/next_permutation.h" }
-      module none_of                  { private header "__algorithm/none_of.h" }
-      module nth_element              { private header "__algorithm/nth_element.h" }
-      module partial_sort             { private header "__algorithm/partial_sort.h" }
-      module partial_sort_copy        { private header "__algorithm/partial_sort_copy.h" }
-      module partition                { private header "__algorithm/partition.h" }
-      module partition_copy           { private header "__algorithm/partition_copy.h" }
-      module partition_point          { private header "__algorithm/partition_point.h" }
-      module pop_heap                 { private header "__algorithm/pop_heap.h" }
-      module prev_permutation         { private header "__algorithm/prev_permutation.h" }
-      module push_heap                { private header "__algorithm/push_heap.h" }
-      module ranges_adjacent_find     { private header "__algorithm/ranges_adjacent_find.h" }
-      module ranges_all_of            { private header "__algorithm/ranges_all_of.h" }
-      module ranges_any_of            { private header "__algorithm/ranges_any_of.h" }
-      module ranges_binary_search     { private header "__algorithm/ranges_binary_search.h" }
-      module ranges_copy              { private header "__algorithm/ranges_copy.h" }
-      module ranges_copy_backward     { private header "__algorithm/ranges_copy_backward.h" }
-      module ranges_copy_if           { private header "__algorithm/ranges_copy_if.h" }
-      module ranges_copy_n            { private header "__algorithm/ranges_copy_n.h" }
-      module ranges_count             { private header "__algorithm/ranges_count.h" }
-      module ranges_count_if          { private header "__algorithm/ranges_count_if.h" }
-      module ranges_equal             { private header "__algorithm/ranges_equal.h" }
-      module ranges_fill              { private header "__algorithm/ranges_fill.h" }
-      module ranges_fill_n            { private header "__algorithm/ranges_fill_n.h" }
-      module ranges_find              { private header "__algorithm/ranges_find.h" }
-      module ranges_find_first_of     { private header "__algorithm/ranges_find_first_of.h" }
-      module ranges_find_if           { private header "__algorithm/ranges_find_if.h" }
-      module ranges_find_if_not       { private header "__algorithm/ranges_find_if_not.h" }
-      module ranges_for_each          { private header "__algorithm/ranges_for_each.h" }
-      module ranges_for_each_n        { private header "__algorithm/ranges_for_each_n.h" }
-      module ranges_is_partitioned    { private header "__algorithm/ranges_is_partitioned.h" }
-      module ranges_is_sorted         { private header "__algorithm/ranges_is_sorted.h" }
-      module ranges_is_sorted_until   { private header "__algorithm/ranges_is_sorted_until.h" }
-      module ranges_lower_bound       { private header "__algorithm/ranges_lower_bound.h" }
-      module ranges_max               { private header "__algorithm/ranges_max.h" }
-      module ranges_max_element       { private header "__algorithm/ranges_max_element.h" }
-      module ranges_min               { private header "__algorithm/ranges_min.h" }
-      module ranges_min_element       { private header "__algorithm/ranges_min_element.h" }
-      module ranges_minmax            { private header "__algorithm/ranges_minmax.h" }
-      module ranges_minmax_element    { private header "__algorithm/ranges_minmax_element.h" }
-      module ranges_mismatch          { private header "__algorithm/ranges_mismatch.h" }
-      module ranges_none_of           { private header "__algorithm/ranges_none_of.h" }
-      module ranges_replace           { private header "__algorithm/ranges_replace.h" }
-      module ranges_replace_if        { private header "__algorithm/ranges_replace_if.h" }
-      module ranges_reverse           { private header "__algorithm/ranges_reverse.h" }
-      module ranges_swap_ranges       { private header "__algorithm/ranges_swap_ranges.h" }
-      module ranges_transform         { private header "__algorithm/ranges_transform.h" }
-      module ranges_upper_bound       { private header "__algorithm/ranges_upper_bound.h" }
-      module remove                   { private header "__algorithm/remove.h" }
-      module remove_copy              { private header "__algorithm/remove_copy.h" }
-      module remove_copy_if           { private header "__algorithm/remove_copy_if.h" }
-      module remove_if                { private header "__algorithm/remove_if.h" }
-      module replace                  { private header "__algorithm/replace.h" }
-      module replace_copy             { private header "__algorithm/replace_copy.h" }
-      module replace_copy_if          { private header "__algorithm/replace_copy_if.h" }
-      module replace_if               { private header "__algorithm/replace_if.h" }
-      module reverse                  { private header "__algorithm/reverse.h" }
-      module reverse_copy             { private header "__algorithm/reverse_copy.h" }
-      module rotate                   { private header "__algorithm/rotate.h" }
-      module rotate_copy              { private header "__algorithm/rotate_copy.h" }
-      module sample                   { private header "__algorithm/sample.h" }
-      module search                   { private header "__algorithm/search.h" }
-      module search_n                 { private header "__algorithm/search_n.h" }
-      module set_difference           { private header "__algorithm/set_difference.h" }
-      module set_intersection         { private header "__algorithm/set_intersection.h" }
-      module set_symmetric_difference { private header "__algorithm/set_symmetric_difference.h" }
-      module set_union                { private header "__algorithm/set_union.h" }
-      module shift_left               { private header "__algorithm/shift_left.h" }
-      module shift_right              { private header "__algorithm/shift_right.h" }
-      module shuffle                  { private header "__algorithm/shuffle.h" }
-      module sift_down                { private header "__algorithm/sift_down.h" }
-      module sort                     { private header "__algorithm/sort.h" }
-      module sort_heap                { private header "__algorithm/sort_heap.h" }
-      module stable_partition         { private header "__algorithm/stable_partition.h" }
-      module stable_sort              { private header "__algorithm/stable_sort.h" }
-      module swap_ranges              { private header "__algorithm/swap_ranges.h" }
-      module transform                { private header "__algorithm/transform.h" }
-      module unique                   { private header "__algorithm/unique.h" }
-      module unique_copy              { private header "__algorithm/unique_copy.h" }
-      module unwrap_iter              { private header "__algorithm/unwrap_iter.h" }
-      module upper_bound              { private header "__algorithm/upper_bound.h" }
+      module adjacent_find                   { private header "__algorithm/adjacent_find.h" }
+      module all_of                          { private header "__algorithm/all_of.h" }
+      module any_of                          { private header "__algorithm/any_of.h" }
+      module binary_search                   { private header "__algorithm/binary_search.h" }
+      module clamp                           { private header "__algorithm/clamp.h" }
+      module comp                            { private header "__algorithm/comp.h" }
+      module comp_ref_type                   { private header "__algorithm/comp_ref_type.h" }
+      module copy                            { private header "__algorithm/copy.h" }
+      module copy_backward                   { private header "__algorithm/copy_backward.h" }
+      module copy_if                         { private header "__algorithm/copy_if.h" }
+      module copy_n                          { private header "__algorithm/copy_n.h" }
+      module count                           { private header "__algorithm/count.h" }
+      module count_if                        { private header "__algorithm/count_if.h" }
+      module equal                           { private header "__algorithm/equal.h" }
+      module equal_range                     { private header "__algorithm/equal_range.h" }
+      module fill                            { private header "__algorithm/fill.h" }
+      module fill_n                          { private header "__algorithm/fill_n.h" }
+      module find                            { private header "__algorithm/find.h" }
+      module find_end                        { private header "__algorithm/find_end.h" }
+      module find_first_of                   { private header "__algorithm/find_first_of.h" }
+      module find_if                         { private header "__algorithm/find_if.h" }
+      module find_if_not                     { private header "__algorithm/find_if_not.h" }
+      module for_each                        { private header "__algorithm/for_each.h" }
+      module for_each_n                      { private header "__algorithm/for_each_n.h" }
+      module generate                        { private header "__algorithm/generate.h" }
+      module generate_n                      { private header "__algorithm/generate_n.h" }
+      module half_positive                   { private header "__algorithm/half_positive.h" }
+      module in_found_result                 { private header "__algorithm/in_found_result.h" }
+      module in_fun_result                   { private header "__algorithm/in_fun_result.h" }
+      module in_in_out_result                { private header "__algorithm/in_in_out_result.h" }
+      module in_in_result                    { private header "__algorithm/in_in_result.h" }
+      module in_out_out_result               { private header "__algorithm/in_out_out_result.h" }
+      module in_out_result                   { private header "__algorithm/in_out_result.h" }
+      module includes                        { private header "__algorithm/includes.h" }
+      module inplace_merge                   { private header "__algorithm/inplace_merge.h" }
+      module is_heap                         { private header "__algorithm/is_heap.h" }
+      module is_heap_until                   { private header "__algorithm/is_heap_until.h" }
+      module is_partitioned                  { private header "__algorithm/is_partitioned.h" }
+      module is_permutation                  { private header "__algorithm/is_permutation.h" }
+      module is_sorted                       { private header "__algorithm/is_sorted.h" }
+      module is_sorted_until                 { private header "__algorithm/is_sorted_until.h" }
+      module iter_swap                       { private header "__algorithm/iter_swap.h" }
+      module iterator_operations             { private header "__algorithm/iterator_operations.h" }
+      module lexicographical_compare         { private header "__algorithm/lexicographical_compare.h" }
+      module lower_bound                     { private header "__algorithm/lower_bound.h" }
+      module make_heap                       { private header "__algorithm/make_heap.h" }
+      module max                             { private header "__algorithm/max.h" }
+      module max_element                     { private header "__algorithm/max_element.h" }
+      module merge                           { private header "__algorithm/merge.h" }
+      module min                             { private header "__algorithm/min.h" }
+      module min_element                     { private header "__algorithm/min_element.h" }
+      module min_max_result                  { private header "__algorithm/min_max_result.h" }
+      module minmax                          { private header "__algorithm/minmax.h" }
+      module minmax_element                  { private header "__algorithm/minmax_element.h" }
+      module mismatch                        { private header "__algorithm/mismatch.h" }
+      module move                            { private header "__algorithm/move.h" }
+      module move_backward                   { private header "__algorithm/move_backward.h" }
+      module next_permutation                { private header "__algorithm/next_permutation.h" }
+      module none_of                         { private header "__algorithm/none_of.h" }
+      module nth_element                     { private header "__algorithm/nth_element.h" }
+      module partial_sort                    { private header "__algorithm/partial_sort.h" }
+      module partial_sort_copy               { private header "__algorithm/partial_sort_copy.h" }
+      module partition                       { private header "__algorithm/partition.h" }
+      module partition_copy                  { private header "__algorithm/partition_copy.h" }
+      module partition_point                 { private header "__algorithm/partition_point.h" }
+      module pop_heap                        { private header "__algorithm/pop_heap.h" }
+      module prev_permutation                { private header "__algorithm/prev_permutation.h" }
+      module push_heap                       { private header "__algorithm/push_heap.h" }
+      module ranges_adjacent_find            { private header "__algorithm/ranges_adjacent_find.h" }
+      module ranges_all_of                   { private header "__algorithm/ranges_all_of.h" }
+      module ranges_any_of                   { private header "__algorithm/ranges_any_of.h" }
+      module ranges_binary_search            { private header "__algorithm/ranges_binary_search.h" }
+      module ranges_copy                     { private header "__algorithm/ranges_copy.h" }
+      module ranges_copy_backward            { private header "__algorithm/ranges_copy_backward.h" }
+      module ranges_copy_if                  { private header "__algorithm/ranges_copy_if.h" }
+      module ranges_copy_n                   { private header "__algorithm/ranges_copy_n.h" }
+      module ranges_count                    { private header "__algorithm/ranges_count.h" }
+      module ranges_count_if                 { private header "__algorithm/ranges_count_if.h" }
+      module ranges_equal                    { private header "__algorithm/ranges_equal.h" }
+      module ranges_fill                     { private header "__algorithm/ranges_fill.h" }
+      module ranges_fill_n                   { private header "__algorithm/ranges_fill_n.h" }
+      module ranges_find                     { private header "__algorithm/ranges_find.h" }
+      module ranges_find_first_of            { private header "__algorithm/ranges_find_first_of.h" }
+      module ranges_find_if                  { private header "__algorithm/ranges_find_if.h" }
+      module ranges_find_if_not              { private header "__algorithm/ranges_find_if_not.h" }
+      module ranges_for_each                 { private header "__algorithm/ranges_for_each.h" }
+      module ranges_for_each_n               { private header "__algorithm/ranges_for_each_n.h" }
+      module ranges_is_partitioned           { private header "__algorithm/ranges_is_partitioned.h" }
+      module ranges_is_sorted                { private header "__algorithm/ranges_is_sorted.h" }
+      module ranges_is_sorted_until          { private header "__algorithm/ranges_is_sorted_until.h" }
+      module ranges_lexicographical_compare  { private header "__algorithm/ranges_lexicographical_compare.h" }
+      module ranges_lower_bound              { private header "__algorithm/ranges_lower_bound.h" }
+      module ranges_max                      { private header "__algorithm/ranges_max.h" }
+      module ranges_max_element              { private header "__algorithm/ranges_max_element.h" }
+      module ranges_min                      { private header "__algorithm/ranges_min.h" }
+      module ranges_min_element              { private header "__algorithm/ranges_min_element.h" }
+      module ranges_minmax                   { private header "__algorithm/ranges_minmax.h" }
+      module ranges_minmax_element           { private header "__algorithm/ranges_minmax_element.h" }
+      module ranges_mismatch                 { private header "__algorithm/ranges_mismatch.h" }
+      module ranges_none_of                  { private header "__algorithm/ranges_none_of.h" }
+      module ranges_replace                  { private header "__algorithm/ranges_replace.h" }
+      module ranges_replace_if               { private header "__algorithm/ranges_replace_if.h" }
+      module ranges_reverse                  { private header "__algorithm/ranges_reverse.h" }
+      module ranges_swap_ranges              { private header "__algorithm/ranges_swap_ranges.h" }
+      module ranges_transform                { private header "__algorithm/ranges_transform.h" }
+      module ranges_upper_bound              { private header "__algorithm/ranges_upper_bound.h" }
+      module remove                          { private header "__algorithm/remove.h" }
+      module remove_copy                     { private header "__algorithm/remove_copy.h" }
+      module remove_copy_if                  { private header "__algorithm/remove_copy_if.h" }
+      module remove_if                       { private header "__algorithm/remove_if.h" }
+      module replace                         { private header "__algorithm/replace.h" }
+      module replace_copy                    { private header "__algorithm/replace_copy.h" }
+      module replace_copy_if                 { private header "__algorithm/replace_copy_if.h" }
+      module replace_if                      { private header "__algorithm/replace_if.h" }
+      module reverse                         { private header "__algorithm/reverse.h" }
+      module reverse_copy                    { private header "__algorithm/reverse_copy.h" }
+      module rotate                          { private header "__algorithm/rotate.h" }
+      module rotate_copy                     { private header "__algorithm/rotate_copy.h" }
+      module sample                          { private header "__algorithm/sample.h" }
+      module search                          { private header "__algorithm/search.h" }
+      module search_n                        { private header "__algorithm/search_n.h" }
+      module set_difference                  { private header "__algorithm/set_difference.h" }
+      module set_intersection                { private header "__algorithm/set_intersection.h" }
+      module set_symmetric_difference        { private header "__algorithm/set_symmetric_difference.h" }
+      module set_union                       { private header "__algorithm/set_union.h" }
+      module shift_left                      { private header "__algorithm/shift_left.h" }
+      module shift_right                     { private header "__algorithm/shift_right.h" }
+      module shuffle                         { private header "__algorithm/shuffle.h" }
+      module sift_down                       { private header "__algorithm/sift_down.h" }
+      module sort                            { private header "__algorithm/sort.h" }
+      module sort_heap                       { private header "__algorithm/sort_heap.h" }
+      module stable_partition                { private header "__algorithm/stable_partition.h" }
+      module stable_sort                     { private header "__algorithm/stable_sort.h" }
+      module swap_ranges                     { private header "__algorithm/swap_ranges.h" }
+      module transform                       { private header "__algorithm/transform.h" }
+      module unique                          { private header "__algorithm/unique.h" }
+      module unique_copy                     { private header "__algorithm/unique_copy.h" }
+      module unwrap_iter                     { private header "__algorithm/unwrap_iter.h" }
+      module upper_bound                     { private header "__algorithm/upper_bound.h" }
     }
   }
   module any {