diff options
| author | Jan Svoboda <jan_svoboda@apple.com> | 2025-04-28 07:43:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-28 07:43:26 -0700 |
| commit | 985410f87f2d19910a8d327527fd30062b042b63 (patch) | |
| tree | 1c4cb157ec0848c56fce54165e6237c9e7f1fc79 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | ba420d8122239592a1fb7ad6efd2c186aecfdef5 (diff) | |
[clang] Hide the `TargetOptions` pointer from `CompilerInvocation` (#106271)
This PR hides the reference-counted pointer that holds `TargetOptions`
from the public API of `CompilerInvocation`. This gives
`CompilerInvocation` an exclusive control over the lifetime of this
member, which will eventually be leveraged to implement a copy-on-write
behavior.
There are two clients that currently share ownership of that pointer:
* `TargetInfo` - This was refactored to hold a non-owning reference to
`TargetOptions`. The options object is typically owned by the
`CompilerInvocation` or by the new `CompilerInstance::AuxTargetOpts` for
the auxiliary target. This needed a bit of care in `ASTUnit::Parse()` to
keep the `CompilerInvocation` alive.
* `clangd::PreambleData` - This was refactored to exclusively own the
`TargetOptions` that get moved out of the `CompilerInvocation`.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
