Skip to content

Commit

Permalink
Revert "Reland "[modules] Fix error about the same module being defin…
Browse files Browse the repository at this point in the history
…ed in different .pcm files when using VFS overlays.""

This reverts commit b070be8.
  • Loading branch information
vsapsai committed Aug 10, 2023
1 parent 45c0053 commit fe9c332
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 113 deletions.
2 changes: 1 addition & 1 deletion clang/lib/Lex/HeaderSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ std::string HeaderSearch::getCachedModuleFileName(Module *Module) {
// *.modulemap file. In this case, just return an empty string.
if (!ModuleMap)
return {};
return getCachedModuleFileName(Module->Name, ModuleMap->getNameAsRequested());
return getCachedModuleFileName(Module->Name, ModuleMap->getName());
}

std::string HeaderSearch::getPrebuiltModuleFileName(StringRef ModuleName,
Expand Down
3 changes: 1 addition & 2 deletions clang/lib/Serialization/ASTWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1327,8 +1327,7 @@ void ASTWriter::WriteControlBlock(Preprocessor &PP, ASTContext &Context,

auto &Map = PP.getHeaderSearchInfo().getModuleMap();
AddPath(WritingModule->PresumedModuleMapFile.empty()
? Map.getModuleMapFileForUniquing(WritingModule)
->getNameAsRequested()
? Map.getModuleMapFileForUniquing(WritingModule)->getName()
: StringRef(WritingModule->PresumedModuleMapFile),
Record);

Expand Down
110 changes: 0 additions & 110 deletions clang/test/VFS/module-map-path.m

This file was deleted.

0 comments on commit fe9c332

Please sign in to comment.