<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/unittests/Serialization/ModuleCacheTest.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>[clang] Initialize the file system explicitly (#158381)</title>
<updated>2025-09-16T15:21:06+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-09-16T15:21:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=30633f30894129919050f24fdd1f8f6bc46beae0'/>
<id>30633f30894129919050f24fdd1f8f6bc46beae0</id>
<content type='text'>
This PR is a part of the effort to make the VFS used in the compiler
more explicit and consistent.

Instead of creating the VFS deep within the compiler (in
`CompilerInstance::createFileManager()`), clients are now required to
explicitly call `CompilerInstance::createVirtualFileSystem()` and
provide the base VFS from the outside.

This PR also helps in breaking up the dependency cycle where creating a
properly configured `DiagnosticsEngine` requires a properly configured
VFS, but creating properly configuring a VFS requires the
`DiagnosticsEngine`.

Both `CompilerInstance::create{FileManager,Diagnostics}()` now just use
the VFS already in `CompilerInstance` instead of taking one as a
parameter, making the VFS consistent across the instance sub-object.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR is a part of the effort to make the VFS used in the compiler
more explicit and consistent.

Instead of creating the VFS deep within the compiler (in
`CompilerInstance::createFileManager()`), clients are now required to
explicitly call `CompilerInstance::createVirtualFileSystem()` and
provide the base VFS from the outside.

This PR also helps in breaking up the dependency cycle where creating a
properly configured `DiagnosticsEngine` requires a properly configured
VFS, but creating properly configuring a VFS requires the
`DiagnosticsEngine`.

Both `CompilerInstance::create{FileManager,Diagnostics}()` now just use
the VFS already in `CompilerInstance` instead of taking one as a
parameter, making the VFS consistent across the instance sub-object.</pre>
</div>
</content>
</entry>
<entry>
<title>NFC: Clean up of IntrusiveRefCntPtr construction from raw pointers. (#151545)</title>
<updated>2025-07-31T19:07:35+00:00</updated>
<author>
<name>James Y Knight</name>
<email>jyknight@google.com</email>
</author>
<published>2025-07-31T19:07:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c7f343750744fd0c928b1da67e9dd894a2fe52cf'/>
<id>c7f343750744fd0c928b1da67e9dd894a2fe52cf</id>
<content type='text'>
Handles clang::DiagnosticsEngine and clang::DiagnosticIDs.

For DiagnosticIDs, this mostly migrates from `new DiagnosticIDs` to
convenience method `DiagnosticIDs::create()`.

Part of cleanup https://github.com/llvm/llvm-project/issues/151026</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Handles clang::DiagnosticsEngine and clang::DiagnosticIDs.

For DiagnosticIDs, this mostly migrates from `new DiagnosticIDs` to
convenience method `DiagnosticIDs::create()`.

Part of cleanup https://github.com/llvm/llvm-project/issues/151026</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[clang] Remove intrusive reference count from `DiagnosticOptions` (#139584)"</title>
<updated>2025-05-22T19:52:03+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-05-22T19:51:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=13e1a2cb2246dc5e9a4afcdacabed4d43154ec3f'/>
<id>13e1a2cb2246dc5e9a4afcdacabed4d43154ec3f</id>
<content type='text'>
This reverts commit e2a885537f11f8d9ced1c80c2c90069ab5adeb1d. Build failures were fixed right away and reverting the original commit without the fixes breaks the build again.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit e2a885537f11f8d9ced1c80c2c90069ab5adeb1d. Build failures were fixed right away and reverting the original commit without the fixes breaks the build again.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[clang] Remove intrusive reference count from `DiagnosticOptions` (#139584)"</title>
<updated>2025-05-22T19:44:20+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-05-22T19:44:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e2a885537f11f8d9ced1c80c2c90069ab5adeb1d'/>
<id>e2a885537f11f8d9ced1c80c2c90069ab5adeb1d</id>
<content type='text'>
This reverts commit 9e306ad4600c4d3392c194a8be88919ee758425c.

Multiple builtbot failures have been reported:
https://github.com/llvm/llvm-project/pull/139584
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 9e306ad4600c4d3392c194a8be88919ee758425c.

Multiple builtbot failures have been reported:
https://github.com/llvm/llvm-project/pull/139584
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Remove intrusive reference count from `DiagnosticOptions` (#139584)</title>
<updated>2025-05-22T19:33:52+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-05-22T19:33:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9e306ad4600c4d3392c194a8be88919ee758425c'/>
<id>9e306ad4600c4d3392c194a8be88919ee758425c</id>
<content type='text'>
The `DiagnosticOptions` class is currently intrusively
reference-counted, which makes reasoning about its lifetime very
difficult in some cases. For example, `CompilerInvocation` owns the
`DiagnosticOptions` instance (wrapped in `llvm::IntrusiveRefCntPtr`) and
only exposes an accessor returning `DiagnosticOptions &amp;`. One would
think this gives `CompilerInvocation` exclusive ownership of the object,
but that's not the case:

```c++
void shareOwnership(CompilerInvocation &amp;CI) {
  llvm::IntrusiveRefCntPtr&lt;DiagnosticOptions&gt; CoOwner = &amp;CI.getDiagnosticOptions();
  // ...
}
```

This is a perfectly valid pattern that is being actually used in the
codebase.

I would like to ensure the ownership of `DiagnosticOptions` by
`CompilerInvocation` is guaranteed to be exclusive. This can be
leveraged for a copy-on-write optimization later on. This PR changes
usages of `DiagnosticOptions` across `clang`, `clang-tools-extra` and
`lldb` to not be intrusively reference-counted.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `DiagnosticOptions` class is currently intrusively
reference-counted, which makes reasoning about its lifetime very
difficult in some cases. For example, `CompilerInvocation` owns the
`DiagnosticOptions` instance (wrapped in `llvm::IntrusiveRefCntPtr`) and
only exposes an accessor returning `DiagnosticOptions &amp;`. One would
think this gives `CompilerInvocation` exclusive ownership of the object,
but that's not the case:

```c++
void shareOwnership(CompilerInvocation &amp;CI) {
  llvm::IntrusiveRefCntPtr&lt;DiagnosticOptions&gt; CoOwner = &amp;CI.getDiagnosticOptions();
  // ...
}
```

This is a perfectly valid pattern that is being actually used in the
codebase.

I would like to ensure the ownership of `DiagnosticOptions` by
`CompilerInvocation` is guaranteed to be exclusive. This can be
leveraged for a copy-on-write optimization later on. This PR changes
usages of `DiagnosticOptions` across `clang`, `clang-tools-extra` and
`lldb` to not be intrusively reference-counted.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][frontend] Require invocation to construct `CompilerInstance` (#137668)</title>
<updated>2025-05-01T14:31:30+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-05-01T14:31:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b69dcb873476cd8e7d3f6f9ffd5b6d0bbe1a3a17'/>
<id>b69dcb873476cd8e7d3f6f9ffd5b6d0bbe1a3a17</id>
<content type='text'>
This PR makes it so that `CompilerInvocation` needs to be provided to
`CompilerInstance` on construction. There are a couple of benefits in my
view:
* Making it impossible to mis-use some `CompilerInstance` APIs. For
example there are cases, where `createDiagnostics()` was called before
`setInvocation()`, causing the `DiagnosticEngine` to use the
default-constructed `DiagnosticOptions` instead of the intended ones.
* This shrinks `CompilerInstance`'s state space.
* This makes it possible to access **the** invocation in
`CompilerInstance`'s constructor (to be used in a follow-up).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR makes it so that `CompilerInvocation` needs to be provided to
`CompilerInstance` on construction. There are a couple of benefits in my
view:
* Making it impossible to mis-use some `CompilerInstance` APIs. For
example there are cases, where `createDiagnostics()` was called before
`setInvocation()`, causing the `DiagnosticEngine` to use the
default-constructed `DiagnosticOptions` instead of the intended ones.
* This shrinks `CompilerInstance`'s state space.
* This makes it possible to access **the** invocation in
`CompilerInstance`'s constructor (to be used in a follow-up).</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[NFC] Explicitly pass a VFS when creating DiagnosticsEngine (#115852)"</title>
<updated>2024-11-21T13:55:30+00:00</updated>
<author>
<name>Kadir Cetinkaya</name>
<email>kadircet@google.com</email>
</author>
<published>2024-11-21T12:04:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=df9a14d7bbf1180e4f1474254c9d7ed6bcb4ce55'/>
<id>df9a14d7bbf1180e4f1474254c9d7ed6bcb4ce55</id>
<content type='text'>
This reverts commit a1153cd6fedd4c906a9840987934ca4712e34cb2 with fixes
to lldb breakages.

Fixes https://github.com/llvm/llvm-project/issues/117145.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit a1153cd6fedd4c906a9840987934ca4712e34cb2 with fixes
to lldb breakages.

Fixes https://github.com/llvm/llvm-project/issues/117145.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[NFC] Explicitly pass a VFS when creating DiagnosticsEngine (#115852)"</title>
<updated>2024-11-21T12:04:30+00:00</updated>
<author>
<name>Sylvestre Ledru</name>
<email>sylvestre@debian.org</email>
</author>
<published>2024-11-21T12:04:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a1153cd6fedd4c906a9840987934ca4712e34cb2'/>
<id>a1153cd6fedd4c906a9840987934ca4712e34cb2</id>
<content type='text'>
Reverted for causing:
https://github.com/llvm/llvm-project/issues/117145

This reverts commit bdd10d9d249bd1c2a45e3de56a5accd97e953458.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverted for causing:
https://github.com/llvm/llvm-project/issues/117145

This reverts commit bdd10d9d249bd1c2a45e3de56a5accd97e953458.
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] Explicitly pass a VFS when creating DiagnosticsEngine (#115852)</title>
<updated>2024-11-21T11:11:41+00:00</updated>
<author>
<name>kadir çetinkaya</name>
<email>kadircet@google.com</email>
</author>
<published>2024-11-21T11:11:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bdd10d9d249bd1c2a45e3de56a5accd97e953458'/>
<id>bdd10d9d249bd1c2a45e3de56a5accd97e953458</id>
<content type='text'>
Starting with 41e3919ded78d8870f7c95e9181c7f7e29aa3cc4 DiagnosticsEngine
creation might perform IO. It was implicitly defaulting to
getRealFileSystem. This patch makes it explicit by pushing the decision
making to callers.

It uses ambient VFS if one is available, and keeps using
`getRealFileSystem` if there aren't any VFS.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Starting with 41e3919ded78d8870f7c95e9181c7f7e29aa3cc4 DiagnosticsEngine
creation might perform IO. It was implicitly defaulting to
getRealFileSystem. This patch makes it explicit by pushing the decision
making to callers.

It uses ambient VFS if one is available, and keeps using
`getRealFileSystem` if there aren't any VFS.</pre>
</div>
</content>
</entry>
<entry>
<title>clang serialization unittests: fix some leaks (#82773)</title>
<updated>2024-02-26T15:58:39+00:00</updated>
<author>
<name>Krasimir Georgiev</name>
<email>krasimir@google.com</email>
</author>
<published>2024-02-26T15:58:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b2ebd8b89777a1c5ba6acc4ad9f195ea2ad5f0de'/>
<id>b2ebd8b89777a1c5ba6acc4ad9f195ea2ad5f0de</id>
<content type='text'>
No functional changes intended.

Fixes some leaks found by running under asan with `--gtest_repeat=2`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No functional changes intended.

Fixes some leaks found by running under asan with `--gtest_repeat=2`.</pre>
</div>
</content>
</entry>
</feed>
