<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/flang/lib/Parser/source.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>[flang] Use module file hashes for more checking and disambiguation (#80354)</title>
<updated>2024-03-01T21:58:36+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>35819229+klausler@users.noreply.github.com</email>
</author>
<published>2024-03-01T21:58:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f7a15e0021697e2346d3aa335dedf2bb3cf468f9'/>
<id>f7a15e0021697e2346d3aa335dedf2bb3cf468f9</id>
<content type='text'>
f18's module files are Fortran with a leading header comment containing
the module file format version and a hash of the following contents.
This hash is currently used only to protect module files against
corruption and truncation.

Extend the use of these hashes to catch or avoid some error cases. When
one module file depends upon another, note its hash in additional module
file header comments. This allows the compiler to detect when the module
dependency is on a module file that has been updated. Further, it allows
the compiler to find the right module file dependency when the same
module file name appears in multiple directories on the module search
path.

The order in which module files are written, when multiple modules
appear in a source file, is such that every dependency is written before
the module(s) that depend upon it, so that their hashes are known.

A warning is emitted when a module file is not the first hit on the
module file search path.

Further work is needed to add a compiler option that emits (larger)
stand-alone module files that incorporate copies of their dependencies
rather than relying on search paths. This will be desirable for
application libraries that want to ship only "top-level" module files
without needing to include their dependencies.

Another future work item would be to admit multiple modules in the same
compilation with the same name if they have distinct hashes.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
f18's module files are Fortran with a leading header comment containing
the module file format version and a hash of the following contents.
This hash is currently used only to protect module files against
corruption and truncation.

Extend the use of these hashes to catch or avoid some error cases. When
one module file depends upon another, note its hash in additional module
file header comments. This allows the compiler to detect when the module
dependency is on a module file that has been updated. Further, it allows
the compiler to find the right module file dependency when the same
module file name appears in multiple directories on the module search
path.

The order in which module files are written, when multiple modules
appear in a source file, is such that every dependency is written before
the module(s) that depend upon it, so that their hashes are known.

A warning is emitted when a module file is not the first hit on the
module file search path.

Further work is needed to add a compiler option that emits (larger)
stand-alone module files that incorporate copies of their dependencies
rather than relying on search paths. This will be desirable for
application libraries that want to ship only "top-level" module files
without needing to include their dependencies.

Another future work item would be to admit multiple modules in the same
compilation with the same name if they have distinct hashes.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Use StringRef::{starts,ends}_with (NFC)</title>
<updated>2023-12-14T07:48:53+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2023-12-14T07:48:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=11efccea8f96c64b893d527523b2bfe8b0734ebd'/>
<id>11efccea8f96c64b893d527523b2bfe8b0734ebd</id>
<content type='text'>
This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Honor #line and related preprocessing directives</title>
<updated>2023-06-29T15:27:37+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2023-06-23T18:01:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e12ffe6a93505e590158ddd8cc73a4f201bbf0aa'/>
<id>e12ffe6a93505e590158ddd8cc73a4f201bbf0aa</id>
<content type='text'>
Extend the SourceFile class to take account of #line directives
when computing source file positions for error messages.
Adjust the output of #line directives to -E output so that they
reflect any #line directives that were in the input.

Differential Revision: https://reviews.llvm.org/D153910
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extend the SourceFile class to take account of #line directives
when computing source file positions for error messages.
Adjust the output of #line directives to -E output so that they
reflect any #line directives that were in the input.

Differential Revision: https://reviews.llvm.org/D153910
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Search for #include "file" in right directory (take 2)</title>
<updated>2021-01-27T23:41:29+00:00</updated>
<author>
<name>peter klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2021-01-26T21:57:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6110e7716cd0000fdeb2a7edfbec7c9991f1a08a'/>
<id>6110e7716cd0000fdeb2a7edfbec7c9991f1a08a</id>
<content type='text'>
Make the #include "file" preprocessing directive begin its
search in the same directory as the file containing the directive,
as other preprocessors and our Fortran INCLUDE statement do.

Avoid current working directory for all source files except the original.

Resolve tests.

Differential Revision: https://reviews.llvm.org/D95481
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the #include "file" preprocessing directive begin its
search in the same directory as the file containing the directive,
as other preprocessors and our Fortran INCLUDE statement do.

Avoid current working directory for all source files except the original.

Resolve tests.

Differential Revision: https://reviews.llvm.org/D95481
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[flang] Search for #include "file" in right directory"</title>
<updated>2021-01-26T13:07:14+00:00</updated>
<author>
<name>Andrzej Warzynski</name>
<email>andrzej.warzynski@arm.com</email>
</author>
<published>2021-01-26T12:54:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e878589098c2ed510159e67d9c6c5e0f3dfbf5a6'/>
<id>e878589098c2ed510159e67d9c6c5e0f3dfbf5a6</id>
<content type='text'>
This reverts commit d987b61b1dce9948801ac37704477e7c257100b1.

As pointed out in https://reviews.llvm.org/D95388, the reverted commit
causes build failures in the following Flang buildbots:
  * http://lab.llvm.org:8011/#/builders/32/builds/2642
  * http://lab.llvm.org:8011/#/builders/33/builds/2131
  * http://lab.llvm.org:8011/#/builders/135/builds/1473
  * http://lab.llvm.org:8011/#/builders/66/builds/1559
  * http://lab.llvm.org:8011/#/builders/134/builds/1409
  * http://lab.llvm.org:8011/#/builders/132/builds/1817
I'm guessing that the patch was only tested with
`FLANG_BUILD_NEW_DRIVER=Off` (i.e. the default). The builders listed
above set `FLANG_BUILD_NEW_DRIVER` to `On`.

Although fixing the build is relatively easy, the reverted patch
modifies the behaviour of the frontend, which breaks driver tests. In
particular, in https://reviews.llvm.org/D93453 support for `-I` was
added that depends on the current behaviour. The reverted patch
changes that behaviour. Either the tests have to be updated or the
change fine-tuned.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit d987b61b1dce9948801ac37704477e7c257100b1.

As pointed out in https://reviews.llvm.org/D95388, the reverted commit
causes build failures in the following Flang buildbots:
  * http://lab.llvm.org:8011/#/builders/32/builds/2642
  * http://lab.llvm.org:8011/#/builders/33/builds/2131
  * http://lab.llvm.org:8011/#/builders/135/builds/1473
  * http://lab.llvm.org:8011/#/builders/66/builds/1559
  * http://lab.llvm.org:8011/#/builders/134/builds/1409
  * http://lab.llvm.org:8011/#/builders/132/builds/1817
I'm guessing that the patch was only tested with
`FLANG_BUILD_NEW_DRIVER=Off` (i.e. the default). The builders listed
above set `FLANG_BUILD_NEW_DRIVER` to `On`.

Although fixing the build is relatively easy, the reverted patch
modifies the behaviour of the frontend, which breaks driver tests. In
particular, in https://reviews.llvm.org/D93453 support for `-I` was
added that depends on the current behaviour. The reverted patch
changes that behaviour. Either the tests have to be updated or the
change fine-tuned.
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Search for #include "file" in right directory</title>
<updated>2021-01-25T21:39:37+00:00</updated>
<author>
<name>peter klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2021-01-25T20:29:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d987b61b1dce9948801ac37704477e7c257100b1'/>
<id>d987b61b1dce9948801ac37704477e7c257100b1</id>
<content type='text'>
Make the #include "file" preprocessing directive begin its
search in the same directory as the file containing the directive,
as other preprocessors and our Fortran INCLUDE statement do.

Avoid current working directory for all source files after the original.

Differential Revision: https://reviews.llvm.org/D95388
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the #include "file" preprocessing directive begin its
search in the same directory as the file containing the directive,
as other preprocessors and our Fortran INCLUDE statement do.

Avoid current working directory for all source files after the original.

Differential Revision: https://reviews.llvm.org/D95388
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][windows] Support platform-specific path separator.</title>
<updated>2020-10-24T03:22:37+00:00</updated>
<author>
<name>Michael Kruse</name>
<email>llvm-project@meinersbur.de</email>
</author>
<published>2020-10-23T14:50:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b57937861f68305068d8a35154811b4303ce52e5'/>
<id>b57937861f68305068d8a35154811b4303ce52e5</id>
<content type='text'>
Remove the assumption that the path separator is `/`. Use functions from `llvm::sys::path` instead.

Reviewed By: isuruf, klausler

Differential Revision: https://reviews.llvm.org/D89369
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the assumption that the path separator is `/`. Use functions from `llvm::sys::path` instead.

Reviewed By: isuruf, klausler

Differential Revision: https://reviews.llvm.org/D89369
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Refine CR handling</title>
<updated>2020-07-14T21:14:35+00:00</updated>
<author>
<name>peter klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2020-07-14T17:16:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=af6b8d51390dc1a4af7ae5de4e71947dce8a75f6'/>
<id>af6b8d51390dc1a4af7ae5de4e71947dce8a75f6</id>
<content type='text'>
We need to retain carriage return characters in source files
that are not parts of multi-byte line endings; they are
significant in CHARACTER literal constants.

Reviewed By: tskeith

Differential Revision: https://reviews.llvm.org/D83808
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to retain carriage return characters in source files
that are not parts of multi-byte line endings; they are
significant in CHARACTER literal constants.

Reviewed By: tskeith

Differential Revision: https://reviews.llvm.org/D83808
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Fix handling of files without terminating newlines.</title>
<updated>2020-04-27T11:40:22+00:00</updated>
<author>
<name>David Truby</name>
<email>david.truby@arm.com</email>
</author>
<published>2020-04-21T18:45:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b547e1a4d163721b2dc3be869a3f06c6203217dc'/>
<id>b547e1a4d163721b2dc3be869a3f06c6203217dc</id>
<content type='text'>
Reviewers: sscalpone

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78578
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewers: sscalpone

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78578
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Reformat with latest clang-format and .clang-format</title>
<updated>2020-03-29T04:00:16+00:00</updated>
<author>
<name>Tim Keith</name>
<email>tkeith@nvidia.com</email>
</author>
<published>2020-03-29T04:00:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1f8790050b0e99e7b46cc69518aa84f46f50738e'/>
<id>1f8790050b0e99e7b46cc69518aa84f46f50738e</id>
<content type='text'>
Original-commit: flang-compiler/f18@9fe84f45d7fd685051004678d6b5775dcc4c6f8f
Reviewed-on: https://github.com/flang-compiler/f18/pull/1094
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Original-commit: flang-compiler/f18@9fe84f45d7fd685051004678d6b5775dcc4c6f8f
Reviewed-on: https://github.com/flang-compiler/f18/pull/1094
</pre>
</div>
</content>
</entry>
</feed>
