[all-commits] [llvm/llvm-project] 5ea78c: [clang] Update ModuleMap::getModuleMapFile* to use...

Ben Langmuir via All-commits all-commits at lists.llvm.org
Wed Oct 5 13:14:23 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ea78c4113f8d2c8be24152f2dd0cadaea352c9d
      https://github.com/llvm/llvm-project/commit/5ea78c4113f8d2c8be24152f2dd0cadaea352c9d
  Author: Ben Langmuir <blangmuir at apple.com>
  Date:   2022-10-05 (Wed, 05 Oct 2022)

  Changed paths:
    M clang/include/clang/Basic/FileEntry.h
    M clang/include/clang/Basic/SourceManager.h
    M clang/include/clang/Lex/ModuleMap.h
    M clang/lib/Basic/SourceManager.cpp
    M clang/lib/Frontend/CompilerInstance.cpp
    M clang/lib/Lex/HeaderSearch.cpp
    M clang/lib/Lex/ModuleMap.cpp
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
    M clang/test/Modules/malformed.cpp
    M clang/tools/libclang/CIndexInclusionStack.cpp

  Log Message:
  -----------
  [clang] Update ModuleMap::getModuleMapFile* to use FileEntryRef

Update SourceManager::ContentCache::OrigEntry to keep the original
FileEntryRef, and use that to enable ModuleMap::getModuleMapFile* to
return the original FileEntryRef. This change should be NFC for
most users of SourceManager::ContentCache, but it could affect behaviour
for users of getNameAsRequested such as in compileModuleImpl. I have not
found a way to detect that difference without additional functional
changes, other than incidental cases like changes from / to \ on
Windows so there is no new test.

Differential Revision: https://reviews.llvm.org/D135220




More information about the All-commits mailing list