<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/test/Modules/preprocess-module.cpp, branch main</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>Make -frewrite-includes put an endif at the end of the included text (#67613)</title>
<updated>2023-10-06T19:27:07+00:00</updated>
<author>
<name>Paul T Robinson</name>
<email>paul.robinson@sony.com</email>
</author>
<published>2023-10-06T19:27:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4a16b51f438ad2827220bd21799bfee5ff3d55ef'/>
<id>4a16b51f438ad2827220bd21799bfee5ff3d55ef</id>
<content type='text'>
The #if now has a conditional expression, so a user can add 
`-D__CLANG_REWRITTEN_SYSTEM_INCLUDES` to include the system headers
instead of using the expanded content, or 
`-D__CLANG_REWRITTEN_INCLUDES` to include all headers.
Also added the filename to the comments it emits, to help identify where
included text ends, making it easier to identify and remove the content of
individual headers.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The #if now has a conditional expression, so a user can add 
`-D__CLANG_REWRITTEN_SYSTEM_INCLUDES` to include the system headers
instead of using the expanded content, or 
`-D__CLANG_REWRITTEN_INCLUDES` to include all headers.
Also added the filename to the comments it emits, to help identify where
included text ends, making it easier to identify and remove the content of
individual headers.</pre>
</div>
</content>
</entry>
<entry>
<title>make -frewrite-includes also rewrite conditions in #if/#elif</title>
<updated>2019-09-18T19:09:41+00:00</updated>
<author>
<name>Lubos Lunak</name>
<email>l.lunak@centrum.cz</email>
</author>
<published>2019-09-18T19:09:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=533434fc728ad457533fac2c8c4ef7b8906dd05e'/>
<id>533434fc728ad457533fac2c8c4ef7b8906dd05e</id>
<content type='text'>
Those conditions may use __has_include, which needs to be rewritten.
The existing code has already tried to rewrite just __has_include,
but it didn't work with macro expansion, so e.g. Qt's
"#define QT_HAS_INCLUDE(x) __has_include(x)" didn't get handled
properly. Since the preprocessor run knows what each condition evaluates
to, just rewrite the entire condition. This of course requires that
the -frewrite-include pass has the same setup as the following
compilation, but that has always been the requirement.

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

llvm-svn: 372248
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Those conditions may use __has_include, which needs to be rewritten.
The existing code has already tried to rewrite just __has_include,
but it didn't work with macro expansion, so e.g. Qt's
"#define QT_HAS_INCLUDE(x) __has_include(x)" didn't get handled
properly. Since the preprocessor run knows what each condition evaluates
to, just rewrite the entire condition. This of course requires that
the -frewrite-include pass has the same setup as the following
compilation, but that has always been the requirement.

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

llvm-svn: 372248
</pre>
</div>
</content>
</entry>
<entry>
<title>When preprocessing with -frewrite-imports and -fmodule-file=, do not pass all</title>
<updated>2017-06-26T19:39:25+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2017-06-26T19:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a21c8e14b609644f5a26416c0e585b4bae66a075'/>
<id>a21c8e14b609644f5a26416c0e585b4bae66a075</id>
<content type='text'>
modules to preprocessing of nested .pcm files.

Making those module files available results in loading more .pcm files than
necessary, and potentially in misbehavior if a module makes itself visible
during its own compilation (as parts of that module that have not yet been
processed would then become visible).

llvm-svn: 306320
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
modules to preprocessing of nested .pcm files.

Making those module files available results in loading more .pcm files than
necessary, and potentially in misbehavior if a module makes itself visible
during its own compilation (as parts of that module that have not yet been
processed would then become visible).

llvm-svn: 306320
</pre>
</div>
</content>
</entry>
<entry>
<title>Retain header search and preprocessing options from AST file when emitting</title>
<updated>2017-06-06T00:32:01+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2017-06-06T00:32:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1893475d95c4203c597163ea2aa9efbbc3d1dfba'/>
<id>1893475d95c4203c597163ea2aa9efbbc3d1dfba</id>
<content type='text'>
preprocessed text for an AST file.

llvm-svn: 304756
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
preprocessed text for an AST file.

llvm-svn: 304756
</pre>
</div>
</content>
</entry>
<entry>
<title>Attempt to fix Windows buildbot failure due to mismatching directory separators in preprocessed output.</title>
<updated>2017-06-05T18:39:31+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2017-06-05T18:39:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6b1993491535d59799de3a3bef4dd5b496b14b54'/>
<id>6b1993491535d59799de3a3bef4dd5b496b14b54</id>
<content type='text'>
llvm-svn: 304727
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 304727
</pre>
</div>
</content>
</entry>
<entry>
<title>Rather than rejecting attempts to run preprocessor-only actions on AST files,</title>
<updated>2017-06-05T18:10:11+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2017-06-05T18:10:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ab75597ddac52f24e9cbd794cded195262ef670e'/>
<id>ab75597ddac52f24e9cbd794cded195262ef670e</id>
<content type='text'>
replay the steps taken to create the AST file with the preprocessor-only action
installed to produce preprocessed output.

This can be used to produce the preprocessed text for an existing .pch or .pcm
file.

llvm-svn: 304726
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
replay the steps taken to create the AST file with the preprocessor-only action
installed to produce preprocessed output.

This can be used to produce the preprocessed text for an existing .pch or .pcm
file.

llvm-svn: 304726
</pre>
</div>
</content>
</entry>
<entry>
<title>Support lazy stat'ing of files referenced by module maps.</title>
<updated>2017-06-02T01:55:39+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2017-06-02T01:55:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=040e12662a674e2ebfc93f86a70eddb7d6fc76da'/>
<id>040e12662a674e2ebfc93f86a70eddb7d6fc76da</id>
<content type='text'>
This patch adds support for a `header` declaration in a module map to specify
certain `stat` information (currently, size and mtime) about that header file.
This has two purposes:

- It removes the need to eagerly `stat` every file referenced by a module map.
  Instead, we track a list of unresolved header files with each size / mtime
  (actually, for simplicity, we track submodules with such headers), and when
  attempting to look up a header file based on a `FileEntry`, we check if there
  are any unresolved header directives with that `FileEntry`'s size / mtime and
  perform deferred `stat`s if so.

- It permits a preprocessed module to be compiled without the original files
  being present on disk. The only reason we used to need those files was to get
  the `stat` information in order to do header -&gt; module lookups when using the
  module. If we're provided with the `stat` information in the preprocessed
  module, we can avoid requiring the files to exist.

Unlike most `header` directives, if a `header` directive with `stat`
information has no corresponding on-disk file the enclosing module is *not*
marked unavailable (so that behavior is consistent regardless of whether we've
resolved a header directive, and so that preprocessed modules don't get marked
unavailable). We could actually do this for all `header` directives: the only
reason we mark the module unavailable if headers are missing is to give a
diagnostic slightly earlier (rather than waiting until we actually try to build
the module / load and validate its .pcm file).

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

llvm-svn: 304515
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds support for a `header` declaration in a module map to specify
certain `stat` information (currently, size and mtime) about that header file.
This has two purposes:

- It removes the need to eagerly `stat` every file referenced by a module map.
  Instead, we track a list of unresolved header files with each size / mtime
  (actually, for simplicity, we track submodules with such headers), and when
  attempting to look up a header file based on a `FileEntry`, we check if there
  are any unresolved header directives with that `FileEntry`'s size / mtime and
  perform deferred `stat`s if so.

- It permits a preprocessed module to be compiled without the original files
  being present on disk. The only reason we used to need those files was to get
  the `stat` information in order to do header -&gt; module lookups when using the
  module. If we're provided with the `stat` information in the preprocessed
  module, we can avoid requiring the files to exist.

Unlike most `header` directives, if a `header` directive with `stat`
information has no corresponding on-disk file the enclosing module is *not*
marked unavailable (so that behavior is consistent regardless of whether we've
resolved a header directive, and so that preprocessed modules don't get marked
unavailable). We could actually do this for all `header` directives: the only
reason we mark the module unavailable if headers are missing is to give a
diagnostic slightly earlier (rather than waiting until we actually try to build
the module / load and validate its .pcm file).

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

llvm-svn: 304515
</pre>
</div>
</content>
</entry>
<entry>
<title>[modules] When compiling a preprocessed module map, look for headers relative</title>
<updated>2017-05-31T20:56:55+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2017-05-31T20:56:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8b7061049403323a2872e031cbb7222b2a85ff97'/>
<id>8b7061049403323a2872e031cbb7222b2a85ff97</id>
<content type='text'>
to the original module map.

Also use the path and name of the original module map when emitting that
information into the .pcm file. The upshot of this is that the produced .pcm
file will track information for headers in their original locations (where the
module was preprocessed), not relative to whatever directory the preprocessed
module map was in when it was built.

llvm-svn: 304346
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to the original module map.

Also use the path and name of the original module map when emitting that
information into the .pcm file. The upshot of this is that the produced .pcm
file will track information for headers in their original locations (where the
module was preprocessed), not relative to whatever directory the preprocessed
module map was in when it was built.

llvm-svn: 304346
</pre>
</div>
</content>
</entry>
<entry>
<title>[modules] Switch from inferring owning modules based on source location to</title>
<updated>2017-05-18T02:29:20+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2017-05-18T02:29:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=54f0440c1fe82e9649168628eee5f28c375ff6f3'/>
<id>54f0440c1fe82e9649168628eee5f28c375ff6f3</id>
<content type='text'>
inferring based on the current module at the point of creation.

This should result in no functional change except when building a preprocessed
module (or more generally when using #pragma clang module begin/end to switch
module in the middle of a file), in which case it allows us to correctly track
the owning module for declarations. We can't map from FileID to module in the
preprocessed module case, since all modules would have the same FileID.

There are still a couple of remaining places that try to infer a module from a
source location; I'll clean those up in follow-up changes.

llvm-svn: 303322
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
inferring based on the current module at the point of creation.

This should result in no functional change except when building a preprocessed
module (or more generally when using #pragma clang module begin/end to switch
module in the middle of a file), in which case it allows us to correctly track
the owning module for declarations. We can't map from FileID to module in the
preprocessed module case, since all modules would have the same FileID.

There are still a couple of remaining places that try to infer a module from a
source location; I'll clean those up in follow-up changes.

llvm-svn: 303322
</pre>
</div>
</content>
</entry>
<entry>
<title>If we are building a module, and we read a second description of the same</title>
<updated>2017-05-08T20:30:47+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2017-05-08T20:30:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4a3751ff246394755e113f162435829b7d67d6ed'/>
<id>4a3751ff246394755e113f162435829b7d67d6ed</id>
<content type='text'>
module from a different module map, ignore it.

This happens during builds of preprocessed modules (where it is harmless).

llvm-svn: 302463
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
module from a different module map, ignore it.

This happens during builds of preprocessed modules (where it is harmless).

llvm-svn: 302463
</pre>
</div>
</content>
</entry>
</feed>
