<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Support/SourceMgr.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>[support] Don't require VFS in `SourceMgr` for loading includes (#163862)</title>
<updated>2025-10-17T15:12:34+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-10-17T15:12:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8fe71e0bdfb9102c607001289010698e51e38711'/>
<id>8fe71e0bdfb9102c607001289010698e51e38711</id>
<content type='text'>
This commit more gracefully handles situations where `SourceMgr` isn't
initialized with a VFS and tries to resolve an include. That's what
happens with the test case `clang -flto=thin -c test.c -o /dev/null`
where test.c contains `asm(" .incbin \"foo.i\" \n");`. Propagating the
actual VFS all the way is very difficult.

This is a follow-up to #162903.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit more gracefully handles situations where `SourceMgr` isn't
initialized with a VFS and tries to resolve an include. That's what
happens with the test case `clang -flto=thin -c test.c -o /dev/null`
where test.c contains `asm(" .incbin \"foo.i\" \n");`. Propagating the
actual VFS all the way is very difficult.

This is a follow-up to #162903.</pre>
</div>
</content>
</entry>
<entry>
<title>[support] Use VFS in `SourceMgr` for loading includes (#162903)</title>
<updated>2025-10-15T16:24:36+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-10-15T16:24:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9deba01c1d5db607da5b943bd5a6185384608605'/>
<id>9deba01c1d5db607da5b943bd5a6185384608605</id>
<content type='text'>
Most `SourceMgr` clients don't make use of include files, but those that
do might want to specify the file system to use. This patch enables that
by making it possible to pass a `vfs::FileSystem` instance into
`SourceMgr`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most `SourceMgr` clients don't make use of include files, but those that
do might want to specify the file system to use. This patch enables that
by making it possible to pass a `vfs::FileSystem` instance into
`SourceMgr`.</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Use list-initialization for returning pairs (#160447)</title>
<updated>2025-09-24T15:44:56+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-09-24T15:44:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7196554c2a16b5323923ae90008ccc48e33c020d'/>
<id>7196554c2a16b5323923ae90008ccc48e33c020d</id>
<content type='text'>
In C++17 and later, "return {A, B};" guarantees copy elision for a
std::pair return type, ensuring the object is constructed directly in
the return slot.  This patch updates those instances under Support/.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In C++17 and later, "return {A, B};" guarantees copy elision for a
std::pair return type, ensuring the object is constructed directly in
the return slot.  This patch updates those instances under Support/.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Construct SmallVector with ArrayRef (NFC) (#101872)</title>
<updated>2024-08-04T15:54:23+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-08-04T15:54:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7df9da7d780f1ece175020c5aef44b4b06df05b7'/>
<id>7df9da7d780f1ece175020c5aef44b4b06df05b7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Add option to print SMDiagnostic into a buffer without the filename and location info (#92050)</title>
<updated>2024-05-14T14:53:53+00:00</updated>
<author>
<name>Artem Chikin</name>
<email>achikin@apple.com</email>
</author>
<published>2024-05-14T14:53:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a4accdfe0c9415ad1bd3dac7dda8cb8bbcd1be2f'/>
<id>a4accdfe0c9415ad1bd3dac7dda8cb8bbcd1be2f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Fix duplicate word typos. NFC</title>
<updated>2023-09-02T01:25:16+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2023-09-02T01:25:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=111fcb0df02db3db8bed1d5db6d911b7ce544d92'/>
<id>111fcb0df02db3db8bed1d5db6d911b7ce544d92</id>
<content type='text'>
Those fixes were taken from https://reviews.llvm.org/D137338
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Those fixes were taken from https://reviews.llvm.org/D137338
</pre>
</div>
</content>
</entry>
<entry>
<title>[TableGen][SourceMgr] Fix obvious mistake in D141220</title>
<updated>2023-01-09T10:16:56+00:00</updated>
<author>
<name>Markus Böck</name>
<email>markus.boeck02@gmail.com</email>
</author>
<published>2023-01-09T10:16:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=90b5afeb652e4073d72a513dbdff9c6e1ec10688'/>
<id>90b5afeb652e4073d72a513dbdff9c6e1ec10688</id>
<content type='text'>
It now tried to open the IncludedFile instead of the Filename, which was not intended.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It now tried to open the IncludedFile instead of the Filename, which was not intended.
</pre>
</div>
</content>
</entry>
<entry>
<title>[TableGen][SourceMgr] Correctly append filename to include directories</title>
<updated>2023-01-09T07:47:09+00:00</updated>
<author>
<name>Markus Böck</name>
<email>markus.boeck02@gmail.com</email>
</author>
<published>2023-01-08T21:20:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=15692e7487b3a96edfe5409c84480ac21d01d768'/>
<id>15692e7487b3a96edfe5409c84480ac21d01d768</id>
<content type='text'>
The current implementation unconditionally appends the system path separator with the filename to the include directory. This is not correct in edge cases however, such as when specifying `/` as include directory (on Unix systems) or just `\` on Windows.
This patch fixes that by using `sys::path::append`, which already has the required logic to correctly implement this.

While this is technically only a change in the `SourceMgr` class, I think the main user of that class, and the include mechanism, is TableGen.
No test attached because no behavioral difference is observable without trying to access the root directory of the users filesystem.

The motivation for this change is a rather funny story, as this actually fixes a performance problem when running `check-mlir` on Windows.
Some tests for `mlir-pdll-lsp-server` lead to adding `\` as include directory in TableGen (which is a valid absolute path on Windows!). Due to the unconditional append, the created filepath would then be of the form `\\&lt;dir&gt;\...` which is also a valid path on Windows, but is a network path. On my machine it'd then attempt to access the network and find a machine with the name `&lt;dir&gt;` and the file there. This call would take several seconds, leading to some tests in `mlir-pdll-lsp-server` taking 2 minutes on my machine.

Running `check-mlir` after this patch reduces the runtime on my machine from 161 seconds to 6 seconds.

Differential Revision: https://reviews.llvm.org/D141220
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current implementation unconditionally appends the system path separator with the filename to the include directory. This is not correct in edge cases however, such as when specifying `/` as include directory (on Unix systems) or just `\` on Windows.
This patch fixes that by using `sys::path::append`, which already has the required logic to correctly implement this.

While this is technically only a change in the `SourceMgr` class, I think the main user of that class, and the include mechanism, is TableGen.
No test attached because no behavioral difference is observable without trying to access the root directory of the users filesystem.

The motivation for this change is a rather funny story, as this actually fixes a performance problem when running `check-mlir` on Windows.
Some tests for `mlir-pdll-lsp-server` lead to adding `\` as include directory in TableGen (which is a valid absolute path on Windows!). Due to the unconditional append, the created filepath would then be of the form `\\&lt;dir&gt;\...` which is also a valid path on Windows, but is a network path. On my machine it'd then attempt to access the network and find a machine with the name `&lt;dir&gt;` and the file there. This call would take several seconds, leading to some tests in `mlir-pdll-lsp-server` taking 2 minutes on my machine.

Running `check-mlir` after this patch reduces the runtime on my machine from 161 seconds to 6 seconds.

Differential Revision: https://reviews.llvm.org/D141220
</pre>
</div>
</content>
</entry>
<entry>
<title>Move from llvm::makeArrayRef to ArrayRef deduction guides - llvm/ part</title>
<updated>2023-01-05T13:11:08+00:00</updated>
<author>
<name>serge-sans-paille</name>
<email>sguelton@mozilla.com</email>
</author>
<published>2023-01-04T07:28:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=38818b60c58c76ba89b990978cdfd2d7b6799260'/>
<id>38818b60c58c76ba89b990978cdfd2d7b6799260</id>
<content type='text'>
Use deduction guides instead of helper functions.

The only non-automatic changes have been:

1. ArrayRef(some_uint8_pointer, 0) needs to be changed into ArrayRef(some_uint8_pointer, (size_t)0) to avoid an ambiguous call with ArrayRef((uint8_t*), (uint8_t*))
2. CVSymbol sym(makeArrayRef(symStorage)); needed to be rewritten as CVSymbol sym{ArrayRef(symStorage)}; otherwise the compiler is confused and thinks we have a (bad) function prototype. There was a few similar situation across the codebase.
3. ADL doesn't seem to work the same for deduction-guides and functions, so at some point the llvm namespace must be explicitly stated.
4. The "reference mode" of makeArrayRef(ArrayRef&lt;T&gt; &amp;) that acts as no-op is not supported (a constructor cannot achieve that).

Per reviewers' comment, some useless makeArrayRef have been removed in the process.

This is a follow-up to https://reviews.llvm.org/D140896 that introduced
the deduction guides.

Differential Revision: https://reviews.llvm.org/D140955
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use deduction guides instead of helper functions.

The only non-automatic changes have been:

1. ArrayRef(some_uint8_pointer, 0) needs to be changed into ArrayRef(some_uint8_pointer, (size_t)0) to avoid an ambiguous call with ArrayRef((uint8_t*), (uint8_t*))
2. CVSymbol sym(makeArrayRef(symStorage)); needed to be rewritten as CVSymbol sym{ArrayRef(symStorage)}; otherwise the compiler is confused and thinks we have a (bad) function prototype. There was a few similar situation across the codebase.
3. ADL doesn't seem to work the same for deduction-guides and functions, so at some point the llvm namespace must be explicitly stated.
4. The "reference mode" of makeArrayRef(ArrayRef&lt;T&gt; &amp;) that acts as no-op is not supported (a constructor cannot achieve that).

Per reviewers' comment, some useless makeArrayRef have been removed in the process.

This is a follow-up to https://reviews.llvm.org/D140896 that introduced
the deduction guides.

Differential Revision: https://reviews.llvm.org/D140955
</pre>
</div>
</content>
</entry>
<entry>
<title>[PDLL] Add support for tablegen includes and importing ODS information</title>
<updated>2022-03-04T00:14:03+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2022-02-15T22:32:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=81f2f4dfb2922e4f7af8bbfd8b653eda7c1f1339'/>
<id>81f2f4dfb2922e4f7af8bbfd8b653eda7c1f1339</id>
<content type='text'>
This commit adds support for processing tablegen include files, and importing
various information from ODS. This includes operations, attribute+type constraints,
attribute/operation/type interfaces, etc. This will allow for much more robust tooling,
and also allows for referencing ODS constructs directly within PDLL (imported interfaces
can be used as constraints, operation result names can be used for member access, etc).

Differential Revision: https://reviews.llvm.org/D119900
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds support for processing tablegen include files, and importing
various information from ODS. This includes operations, attribute+type constraints,
attribute/operation/type interfaces, etc. This will allow for much more robust tooling,
and also allows for referencing ODS constructs directly within PDLL (imported interfaces
can be used as constraints, operation result names can be used for member access, etc).

Differential Revision: https://reviews.llvm.org/D119900
</pre>
</div>
</content>
</entry>
</feed>
