<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/Lex/ModuleMapFile.cpp, branch users/mingmingl-llvm/samplefdo-profile-format</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>Revert "[clang][Modules] Reporting Errors for Duplicating Link Declar… (#157154)</title>
<updated>2025-09-06T15:50:21+00:00</updated>
<author>
<name>Qiongsi Wu</name>
<email>qiongsiwu@gmail.com</email>
</author>
<published>2025-09-06T15:50:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9da02e7521da1d2024fbac62b5d9995a1edefc7a'/>
<id>9da02e7521da1d2024fbac62b5d9995a1edefc7a</id>
<content type='text'>
…ations in `modulemap`s (#148959)"

This reverts commit 538e9e8ebd09233b3900ed2dfd23e4e1ca5c9fc0 for two
reasons.

1. Link decls in submodules can make sense even if the submodule is not
explicit. We need to review the error check. This PR reverts the check
so we still allow link decls in submodules.
2. It is not a fatal error to have duplicating link decls. The linker
deduplicates them anyways.

rdar://159467837</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
…ations in `modulemap`s (#148959)"

This reverts commit 538e9e8ebd09233b3900ed2dfd23e4e1ca5c9fc0 for two
reasons.

1. Link decls in submodules can make sense even if the submodule is not
explicit. We need to review the error check. This PR reverts the check
so we still allow link decls in submodules.
2. It is not a fatal error to have duplicating link decls. The linker
deduplicates them anyways.

rdar://159467837</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][Modules] Reporting Errors for Duplicating Link Declarations in `modulemap`s (#148959)</title>
<updated>2025-08-22T16:18:01+00:00</updated>
<author>
<name>Qiongsi Wu</name>
<email>qiongsiwu@gmail.com</email>
</author>
<published>2025-08-22T16:18:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=538e9e8ebd09233b3900ed2dfd23e4e1ca5c9fc0'/>
<id>538e9e8ebd09233b3900ed2dfd23e4e1ca5c9fc0</id>
<content type='text'>
This PR teaches the modulemap parsing logic to report warnings that
default to errors if the parsing logic sees duplicating link
declarations in the same module. Specifically, duplicating link
declarations means multiple link declarations with the same
string-literal in the same module. No errors are reported if a same link
declaration exist in a submodule and its enclosing module.

The warning can be disabled with `-Wno-module-link-redeclaration`. 

rdar://155880064</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR teaches the modulemap parsing logic to report warnings that
default to errors if the parsing logic sees duplicating link
declarations in the same module. Specifically, duplicating link
declarations means multiple link declarations with the same
string-literal in the same module. No errors are reported if a same link
declaration exist in a submodule and its enclosing module.

The warning can be disabled with `-Wno-module-link-redeclaration`. 

rdar://155880064</pre>
</div>
</content>
</entry>
<entry>
<title>[Lex] Remove unused includes (NFC) (#141523)</title>
<updated>2025-05-26T21:57:05+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-05-26T21:57:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=36d57677bbbcc4f32e7aa16b73ca22fcae13a3aa'/>
<id>36d57677bbbcc4f32e7aa16b73ca22fcae13a3aa</id>
<content type='text'>
These are identified by misc-include-cleaner.  I've filtered out those
that break builds.  Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are identified by misc-include-cleaner.  I've filtered out those
that break builds.  Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][modules] Lazily load by name lookups in module maps (#132853)</title>
<updated>2025-05-06T23:40:01+00:00</updated>
<author>
<name>Michael Spencer</name>
<email>bigcheesegs@gmail.com</email>
</author>
<published>2025-05-06T23:40:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=32fb8c5f5fdeb20de28846e2fe9e2c7525f62086'/>
<id>32fb8c5f5fdeb20de28846e2fe9e2c7525f62086</id>
<content type='text'>
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::findOrLoadModule` which will load modules
from parsed but not loaded module maps. This cannot be used anywhere
that the module loading code calls into as it can create infinite
recursion.

This currently just reparses module maps when looking up a module by
header. This is fine as redeclarations are allowed from the same file,
but future patches will also make looking up a module by header lazy.

This patch changes the shadow.m test to use explicitly built modules and
`#import`. This test and the shadow feature are very brittle and do not
work in general. The test relied on pcm files being left behind by prior
failing clang invocations that were then reused by the last invocation.
If you clean the cache then the last invocation will always fail. This
is because the input module map and the `-fmodule-map-file=` module map
are parsed in the same module scope, and `-fmodule-map-file=` is
forwarded to implicit module builds. That means you are guaranteed to
hit a module redeclaration error if the TU actually imports the module
it is trying to shadow.

This patch changes when we load A2's module map to after the `A` module
has been loaded, which sets the `IsFromModuleFile` bit on `A`. This
means that A2's `A` is skipped entirely instead of creating a shadow
module, and we get textual inclusion. It is possible to construct a case
where this would happen before this patch too.

An upcoming patch in this series will rework shadowing to work in the
general case, but that's only possible once header -&gt; module lookup is
lazy too.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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::findOrLoadModule` which will load modules
from parsed but not loaded module maps. This cannot be used anywhere
that the module loading code calls into as it can create infinite
recursion.

This currently just reparses module maps when looking up a module by
header. This is fine as redeclarations are allowed from the same file,
but future patches will also make looking up a module by header lazy.

This patch changes the shadow.m test to use explicitly built modules and
`#import`. This test and the shadow feature are very brittle and do not
work in general. The test relied on pcm files being left behind by prior
failing clang invocations that were then reused by the last invocation.
If you clean the cache then the last invocation will always fail. This
is because the input module map and the `-fmodule-map-file=` module map
are parsed in the same module scope, and `-fmodule-map-file=` is
forwarded to implicit module builds. That means you are guaranteed to
hit a module redeclaration error if the TU actually imports the module
it is trying to shadow.

This patch changes when we load A2's module map to after the `A` module
has been loaded, which sets the `IsFromModuleFile` bit on `A`. This
means that A2's `A` is skipped entirely instead of creating a shadow
module, and we get textual inclusion. It is possible to construct a case
where this would happen before this patch too.

An upcoming patch in this series will rework shadowing to work in the
general case, but that's only possible once header -&gt; module lookup is
lazy too.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][modules] Separate parsing of modulemaps (#119740)</title>
<updated>2025-02-26T22:32:50+00:00</updated>
<author>
<name>Michael Spencer</name>
<email>bigcheesegs@gmail.com</email>
</author>
<published>2025-02-26T22:32:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8fb88f568011fb916cda9d7927ac97c6751a8b89'/>
<id>8fb88f568011fb916cda9d7927ac97c6751a8b89</id>
<content type='text'>
This separates out parsing of modulemaps from updating the
`clang::ModuleMap` information.

Currently this has no effect other than slightly changing diagnostics.
Upcoming changes will use this to allow searching for modules without
fully processing modulemaps.


This creates a new `modulemap` namespace because there are too many
things called ModuleMap* right now that mean different things. I'd like
to clean this up, but I'm not sure yet what I want to call everything.

This also drops the `SourceLocation` from `moduleMapFileRead`. This is
never used in tree, and in future patches I plan to make the modulemap
parser use a different `SourceManager` so that we can share modulemap
parsing between `CompilerInstance`s. This will make the `SourceLocation`
meaningless.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This separates out parsing of modulemaps from updating the
`clang::ModuleMap` information.

Currently this has no effect other than slightly changing diagnostics.
Upcoming changes will use this to allow searching for modules without
fully processing modulemaps.


This creates a new `modulemap` namespace because there are too many
things called ModuleMap* right now that mean different things. I'd like
to clean this up, but I'm not sure yet what I want to call everything.

This also drops the `SourceLocation` from `moduleMapFileRead`. This is
never used in tree, and in future patches I plan to make the modulemap
parser use a different `SourceManager` so that we can share modulemap
parsing between `CompilerInstance`s. This will make the `SourceLocation`
meaningless.</pre>
</div>
</content>
</entry>
</feed>
