Skip to content

Commit

Permalink
[NFC] Rename 'DependentModules' in ModuleFile to TransitiveImports
Browse files Browse the repository at this point in the history
Required in the review process of #92083
  • Loading branch information
ChuanqiXu9 committed May 27, 2024
1 parent e73e495 commit b590ba7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/Serialization/ASTReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -2246,7 +2246,7 @@ class ASTReader

auto [Loc, ModuleFileIndex] = ReadUntranslatedSourceLocation(Raw, Seq);
ModuleFile *OwningModuleFile =
ModuleFileIndex == 0 ? &MF : MF.DependentModules[ModuleFileIndex - 1];
ModuleFileIndex == 0 ? &MF : MF.TransitiveImports[ModuleFileIndex - 1];

assert(!SourceMgr.isLoadedSourceLocation(Loc) &&
"Run out source location space");
Expand Down
4 changes: 2 additions & 2 deletions clang/include/clang/Serialization/ModuleFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -513,11 +513,11 @@ class ModuleFile {

/// List of modules which this modules dependent on. Different
/// from `Imports`, this includes indirectly imported modules too.
/// The order of DependentModules is significant. It should keep
/// The order of TransitiveImports is significant. It should keep
/// the same order with that module file manager when we write
/// the current module file. The value of the member will be initialized
/// in `ASTReader::ReadModuleOffsetMap`.
llvm::SmallVector<ModuleFile *, 16> DependentModules;
llvm::SmallVector<ModuleFile *, 16> TransitiveImports;

/// Determine whether this module was directly imported at
/// any point during translation.
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Serialization/ASTReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4059,7 +4059,7 @@ void ASTReader::ReadModuleOffsetMap(ModuleFile &F) const {
RemapBuilder DeclRemap(F.DeclRemap);
RemapBuilder TypeRemap(F.TypeRemap);

auto &ImportedModuleVector = F.DependentModules;
auto &ImportedModuleVector = F.TransitiveImports;
assert(ImportedModuleVector.empty());

while (Data < DataEnd) {
Expand Down

0 comments on commit b590ba7

Please sign in to comment.