mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Revert "[serialization] Reject loading a module with the wrong case."
This reverts commit r22818, which caused to fail. Swift SVN r22822
This commit is contained in:
@@ -504,8 +504,7 @@ ModuleFile::ModuleFile(
|
||||
case CONTROL_BLOCK_ID: {
|
||||
cursor.EnterSubBlock(CONTROL_BLOCK_ID);
|
||||
|
||||
ModuleStatus err;
|
||||
std::tie(err, Name) = validateControlBlock(cursor, scratch);
|
||||
ModuleStatus err = validateControlBlock(cursor, scratch).first;
|
||||
if (err != ModuleStatus::Valid) {
|
||||
error(err);
|
||||
return;
|
||||
@@ -747,11 +746,6 @@ bool ModuleFile::associateWithFileContext(FileUnit *file, SourceLoc diagLoc) {
|
||||
assert(!FileContext && "already associated with an AST module");
|
||||
FileContext = file;
|
||||
|
||||
if (file->getParentModule()->Name.str() != Name) {
|
||||
error(ModuleStatus::NameMismatch);
|
||||
return false;
|
||||
}
|
||||
|
||||
ASTContext &ctx = getContext();
|
||||
bool missingDependency = false;
|
||||
for (auto &dependency : Dependencies) {
|
||||
@@ -1097,7 +1091,8 @@ ModuleFile::collectLinkLibraries(Module::LinkLibraryCallback callback) const {
|
||||
for (auto &lib : LinkLibraries)
|
||||
callback(lib);
|
||||
if (Bits.IsFramework)
|
||||
callback(LinkLibrary(Name, LibraryKind::Framework));
|
||||
callback(LinkLibrary(FileContext->getParentModule()->Name.str(),
|
||||
LibraryKind::Framework));
|
||||
}
|
||||
|
||||
void ModuleFile::getTopLevelDecls(SmallVectorImpl<Decl *> &results) {
|
||||
|
||||
Reference in New Issue
Block a user