jansvoboda11 wrote:
> > This now makes much more sense after the renames from the prep-commit.
> > There are still some naming inconsistencies, though. For example
> > `ModuleMap::loadModuleMapFile()` both **parses** and loads a module map
> > file, but `ModuleMap::findOrLoadModule()` expects
@@ -2128,9 +2245,16 @@ bool ModuleMap::loadModuleMapFile(FileEntryRef File,
bool IsSystem,
// If the module map file wasn't already entered, do so now.
if (ID.isInvalid()) {
-auto FileCharacter =
-IsSystem ? SrcMgr::C_System_ModuleMap : SrcMgr::C_User_ModuleMa
@@ -2128,9 +2245,16 @@ bool ModuleMap::loadModuleMapFile(FileEntryRef File,
bool IsSystem,
// If the module map file wasn't already entered, do so now.
if (ID.isInvalid()) {
-auto FileCharacter =
-IsSystem ? SrcMgr::C_System_ModuleMap : SrcMgr::C_User_ModuleMa
https://github.com/Bigcheese updated
https://github.com/llvm/llvm-project/pull/132853
>From d19d7c6314dbb68abfe7cdceebd8e8f65aedddc5 Mon Sep 17 00:00:00 2001
From: Michael Spencer
Date: Wed, 29 Jan 2025 12:49:29 -0800
Subject: [PATCH] [clang][modules] Lazily load by name lookups in module maps
Bigcheese wrote:
> This now makes much more sense after the renames from the prep-commit. There
> are still some naming inconsistencies, though. For example
> `ModuleMap::loadModuleMapFile()` both **parses** and loads a module map file,
> but `ModuleMap::findOrLoadModule()` expects the module
https://github.com/jansvoboda11 commented:
This now makes much more sense after the renames from the prep-commit. There
are still some naming inconsistencies, though. For example
`ModuleMap::loadModuleMapFile()` both **parses** and loads a module map file,
but `ModuleMap::findOrLoadModule()` e
@@ -373,10 +373,10 @@ Module *HeaderSearch::lookupModule(StringRef ModuleName,
StringRef SearchName,
SmallString<128> NestedModuleMapDirName;
NestedModuleMapDirName = Dir.getDirRef()->getName();
llvm::sys::path::append(NestedModuleMapDirName, ModuleName);
-if (
@@ -359,11 +359,11 @@ Module *HeaderSearch::lookupModule(StringRef ModuleName,
StringRef SearchName,
// checked
DirectoryEntryRef NormalDir = *Dir.getDirRef();
// Search for a module map file in this directory.
-if (loadModuleMapFile(NormalDir, IsSystem,
-
@@ -1801,6 +1801,33 @@ HeaderSearch::loadModuleMapFileImpl(FileEntryRef File,
bool IsSystem,
return LMM_NewlyLoaded;
}
+HeaderSearch::LoadModuleMapResult
+HeaderSearch::parseModuleMapFileImpl(FileEntryRef File, bool IsSystem,
Bigcheese wrote:
https://githu
https://github.com/Bigcheese created
https://github.com/llvm/llvm-project/pull/132853
Instead of eagerly populating the `clang::ModuleMap` when looking up a module
by name, this patch changes `HeaderSearch` to only load the modules that are
actually used.
This introduces `ModuleMap::findOrLoa
llvmbot wrote:
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-clang-modules
Author: Michael Spencer (Bigcheese)
Changes
Instead of eagerly populating the `clang::ModuleMap` when looking up a module
by name, this patch changes `HeaderSearch` to only load the modules that are
actually use
11 matches
Mail list logo