diff --git a/libcxx/include/module.modulemap.in b/libcxx/include/module.modulemap.in --- a/libcxx/include/module.modulemap.in +++ b/libcxx/include/module.modulemap.in @@ -847,18 +847,6 @@ module condition_variable { private header "__condition_variable/condition_variable.h" } } } - module coroutine { - header "coroutine" - export compare - export * - - module __coroutine { - module coroutine_handle { private header "__coroutine/coroutine_handle.h" } - module coroutine_traits { private header "__coroutine/coroutine_traits.h" } - module noop_coroutine_handle { private header "__coroutine/noop_coroutine_handle.h" } - module trivial_awaitables { private header "__coroutine/trivial_awaitables.h" } - } - } module deque { header "deque" export initializer_list @@ -1799,6 +1787,19 @@ module __undef_macros { header "__undef_macros" export * } module __verbose_abort { header "__verbose_abort" export * } + module coroutine { + header "coroutine" + export compare + export * + + module __coroutine { + module coroutine_handle { private header "__coroutine/coroutine_handle.h" } + module coroutine_traits { private header "__coroutine/coroutine_traits.h" } + module noop_coroutine_handle { private header "__coroutine/noop_coroutine_handle.h" } + module trivial_awaitables { private header "__coroutine/trivial_awaitables.h" } + } + } + module experimental { requires cplusplus11 diff --git a/libcxx/test/libcxx/containers/associative/map/find.modules.compile.pass.mm b/libcxx/test/libcxx/containers/associative/map/find.modules.compile.pass.mm new file mode 100644 --- /dev/null +++ b/libcxx/test/libcxx/containers/associative/map/find.modules.compile.pass.mm @@ -0,0 +1,16 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Make sure that we don't get a compiler error when trying to use std::map::find +// from Objective-C++. This happened in Objective-C++ mode with modules enabled (rdar://106813461). + +#include + +void f(std::map const& map, int key) { + (void)map.find(key); +}