mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[cxx-interop] Disallow import std, require import CxxStdlib
`CxxStdlib` will now be the only accepted module name for the C++ standard library module in Swift.
This commit is contained in:
@@ -1908,6 +1908,8 @@ StringRef ModuleDecl::ReverseFullNameIterator::operator*() const {
|
||||
|
||||
auto *clangModule =
|
||||
static_cast<const clang::Module *>(current.get<const void *>());
|
||||
if (!clangModule->isSubModule() && clangModule->Name == "std")
|
||||
return "CxxStdlib";
|
||||
return clangModule->Name;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user