Skip to content

Commit

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

This reverts commit 97dfaf4.

llvm-clang-x86_64-sie-win buildbot is failing with the added test.
  • Loading branch information
vsapsai committed Aug 10, 2023
1 parent d21ec35 commit 91b10f6
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 91b10f6

Please sign in to comment.