<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Plugins/SymbolFile, 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>Revert "Reland [MS][clang] Add support for vector deleting destructors" (#169116)</title>
<updated>2025-11-22T01:14:34+00:00</updated>
<author>
<name>Zequan Wu</name>
<email>zequanwu@google.com</email>
</author>
<published>2025-11-22T01:14:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=54a4da9df6906b63878ad6d0ea6da3ed7d2d8432'/>
<id>54a4da9df6906b63878ad6d0ea6da3ed7d2d8432</id>
<content type='text'>
This reverts 4d10c1165442cbbbc0017b48fcdd7dae1ccf3678 and its two
dependent commits: e6b9805b574bb5c90263ec7fbcb94df76d2807a4 and
c243406a695ca056a07ef4064b0f9feee7685320, see discussion in
https://github.com/llvm/llvm-project/pull/165598#issuecomment-3563825509.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts 4d10c1165442cbbbc0017b48fcdd7dae1ccf3678 and its two
dependent commits: e6b9805b574bb5c90263ec7fbcb94df76d2807a4 and
c243406a695ca056a07ef4064b0f9feee7685320, see discussion in
https://github.com/llvm/llvm-project/pull/165598#issuecomment-3563825509.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Eliminate SupportFileSP nullptr derefs (#168624)</title>
<updated>2025-11-21T00:45:11+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-11-21T00:45:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=06eac9feb92cba1d24e8a674c643aae1200d2bc8'/>
<id>06eac9feb92cba1d24e8a674c643aae1200d2bc8</id>
<content type='text'>
This patch fixes and eliminates the possibility of SupportFileSP ever
being nullptr. The support file was originally treated like a value
type, but became a polymorphic type and therefore has to be stored and
passed around as a pointer.

To avoid having all the callers check the validity of the pointer, I
introduced the invariant that SupportFileSP is never null and always
default constructed. However, without enforcement at the type level,
that's fragile and indeed, we already identified two crashes where
someone accidentally broke that invariant.

This PR introduces a NonNullSharedPtr to prevent that. NonNullSharedPtr
is a smart pointer wrapper around std::shared_ptr that guarantees the
pointer is never null. If default-constructed, it creates a
default-constructed instance of the contained type. Note that I'm using
private inheritance because you shouldn't inherit from standard library
classes due to the lack of virtual destructor. So while the new
abstraction looks like a `std::shared_ptr`, it is in fact **not** a
shared pointer. Given that our destructor is trivial, we could use
public inheritance, but currently there's no need for it.

rdar://164989579</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes and eliminates the possibility of SupportFileSP ever
being nullptr. The support file was originally treated like a value
type, but became a polymorphic type and therefore has to be stored and
passed around as a pointer.

To avoid having all the callers check the validity of the pointer, I
introduced the invariant that SupportFileSP is never null and always
default constructed. However, without enforcement at the type level,
that's fragile and indeed, we already identified two crashes where
someone accidentally broke that invariant.

This PR introduces a NonNullSharedPtr to prevent that. NonNullSharedPtr
is a smart pointer wrapper around std::shared_ptr that guarantees the
pointer is never null. If default-constructed, it creates a
default-constructed instance of the contained type. Note that I'm using
private inheritance because you shouldn't inherit from standard library
classes due to the lack of virtual destructor. So while the new
abstraction looks like a `std::shared_ptr`, it is in fact **not** a
shared pointer. Given that our destructor is trivial, we could use
public inheritance, but currently there's no need for it.

rdar://164989579</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB][DWARF] Use the same qualified name computation for Rust (#165840)</title>
<updated>2025-11-17T10:38:40+00:00</updated>
<author>
<name>Kiva</name>
<email>imkiva@islovely.icu</email>
</author>
<published>2025-11-17T10:38:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bdae26f3b47b1022402d578c2a748c1c5744f308'/>
<id>bdae26f3b47b1022402d578c2a748c1c5744f308</id>
<content type='text'>
Currently LLDB's `ParseRustVariantPart` generates the following
`CXXRecordDecl` for a Rust enum
```rust
enum AA {
  A(u8)
}
```

```
CXXRecordDecl 0x5555568d5970 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; struct AA
|-CXXRecordDecl 0x5555568d5ab0 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; union test_issue::AA$Inner definition
| |-CXXRecordDecl 0x5555568d5d18 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; struct A$Variant definition
| | |-DefinitionData pass_in_registers aggregate standard_layout trivially_copyable trivial
| | | `-Destructor simple irrelevant trivial needs_implicit
| | `-FieldDecl 0x555555a77880 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; value 'test_issue::AA::A'
| `-FieldDecl 0x555555a778f0 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; $variant$ 'test_issue::AA::test_issue::AA$Inner::A$Variant'
|-CXXRecordDecl 0x5555568d5c48 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; struct A definition
| `-FieldDecl 0x555555a777e0 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; __0 'unsigned char'
`-FieldDecl 0x555555a77960 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; $variants$ 'test_issue::AA::test_issue::AA$Inner'
```

While when the Rust enum type name is the same as its variant name, the
generated `CXXRecordDecl` becomes the following – there's a circular
reference between `struct A$Variant` and `struct A`, causing #163048.

```rust
enum A {
  A(u8)
}
```

```
CXXRecordDecl 0x5555568d5760 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; struct A
|-CXXRecordDecl 0x5555568d58a0 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; union test_issue::A$Inner definition
| |-CXXRecordDecl 0x5555568d5a38 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; struct A$Variant definition
| | `-FieldDecl 0x5555568d5b70 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; value 'test_issue::A'    &lt;---- bug here
| `-FieldDecl 0x5555568d5be0 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; $variant$ 'test_issue::A::test_issue::A$Inner::A$Variant'
`-FieldDecl 0x5555568d5c50 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; $variants$ 'test_issue::A::test_issue::A$Inner'
```

The problem was caused by `GetUniqueTypeNameAndDeclaration` not
returning the correct qualified name for DWARF DIE `test_issue::A::A`,
instead, it returned `A`. This caused `ParseStructureLikeDIE` to find
the wrong type `test_issue::A` and returned early.

The failure in `GetUniqueTypeNameAndDeclaration` appears to stem from a
language check that returns early unless the language is C++. I changed
it so Rust follows the C++ path rather than returning. I’m not entirely
sure this is the right approach — Rust’s qualified name rules look
similar, but not identical? Alternatively, we could add a Rust-specific
implementation that forms qualified names according to Rust's rules.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently LLDB's `ParseRustVariantPart` generates the following
`CXXRecordDecl` for a Rust enum
```rust
enum AA {
  A(u8)
}
```

```
CXXRecordDecl 0x5555568d5970 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; struct AA
|-CXXRecordDecl 0x5555568d5ab0 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; union test_issue::AA$Inner definition
| |-CXXRecordDecl 0x5555568d5d18 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; struct A$Variant definition
| | |-DefinitionData pass_in_registers aggregate standard_layout trivially_copyable trivial
| | | `-Destructor simple irrelevant trivial needs_implicit
| | `-FieldDecl 0x555555a77880 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; value 'test_issue::AA::A'
| `-FieldDecl 0x555555a778f0 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; $variant$ 'test_issue::AA::test_issue::AA$Inner::A$Variant'
|-CXXRecordDecl 0x5555568d5c48 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; struct A definition
| `-FieldDecl 0x555555a777e0 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; __0 'unsigned char'
`-FieldDecl 0x555555a77960 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; $variants$ 'test_issue::AA::test_issue::AA$Inner'
```

While when the Rust enum type name is the same as its variant name, the
generated `CXXRecordDecl` becomes the following – there's a circular
reference between `struct A$Variant` and `struct A`, causing #163048.

```rust
enum A {
  A(u8)
}
```

```
CXXRecordDecl 0x5555568d5760 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; struct A
|-CXXRecordDecl 0x5555568d58a0 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; union test_issue::A$Inner definition
| |-CXXRecordDecl 0x5555568d5a38 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; struct A$Variant definition
| | `-FieldDecl 0x5555568d5b70 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; value 'test_issue::A'    &lt;---- bug here
| `-FieldDecl 0x5555568d5be0 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; $variant$ 'test_issue::A::test_issue::A$Inner::A$Variant'
`-FieldDecl 0x5555568d5c50 &lt;&lt;invalid sloc&gt;&gt; &lt;invalid sloc&gt; $variants$ 'test_issue::A::test_issue::A$Inner'
```

The problem was caused by `GetUniqueTypeNameAndDeclaration` not
returning the correct qualified name for DWARF DIE `test_issue::A::A`,
instead, it returned `A`. This caused `ParseStructureLikeDIE` to find
the wrong type `test_issue::A` and returned early.

The failure in `GetUniqueTypeNameAndDeclaration` appears to stem from a
language check that returns early unless the language is C++. I changed
it so Rust follows the C++ path rather than returning. I’m not entirely
sure this is the right approach — Rust’s qualified name rules look
similar, but not identical? Alternatively, we could add a Rust-specific
implementation that forms qualified names according to Rust's rules.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Add the ability to load DWARF64 .debug_str_offsets tables for DWARF32 DWARF units in .dwp files in LLDB. (#167997)</title>
<updated>2025-11-15T00:35:43+00:00</updated>
<author>
<name>Greg Clayton</name>
<email>gclayton@fb.com</email>
</author>
<published>2025-11-15T00:35:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=45300473344c4e71054917f2890f8baa7c14ec50'/>
<id>45300473344c4e71054917f2890f8baa7c14ec50</id>
<content type='text'>
This patch is updating the reading capabilities of the LLDB DWARF parser
for a llvm-dwp patch https://github.com/llvm/llvm-project/pull/167457
that will emit .dwp files where the compile units are DWARF32 and the
.debug_str_offsets tables will be emitted as DWARF64 to allow .debug_str
sections that exceed 4GB in size.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch is updating the reading capabilities of the LLDB DWARF parser
for a llvm-dwp patch https://github.com/llvm/llvm-project/pull/167457
that will emit .dwp files where the compile units are DWARF32 and the
.debug_str_offsets tables will be emitted as DWARF64 to allow .debug_str
sections that exceed 4GB in size.</pre>
</div>
</content>
</entry>
<entry>
<title>Reland [MS][clang] Add support for vector deleting destructors (#165598)</title>
<updated>2025-11-13T09:32:03+00:00</updated>
<author>
<name>Mariya Podchishchaeva</name>
<email>mariya.podchishchaeva@intel.com</email>
</author>
<published>2025-11-13T09:32:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4d10c1165442cbbbc0017b48fcdd7dae1ccf3678'/>
<id>4d10c1165442cbbbc0017b48fcdd7dae1ccf3678</id>
<content type='text'>
MSVC supports an extension allowing to delete an array of objects via
pointer whose static type doesn't match its dynamic type. This is done
via generation of special destructors - vector deleting destructors.
MSVC's virtual tables always contain a pointer to the vector deleting
destructor for classes with virtual destructors, so not having this
extension implemented causes clang to generate code that is not
compatible with the code generated by MSVC, because clang always puts a
pointer to a scalar deleting destructor to the vtable. As a bonus the
deletion of an array of polymorphic object will work just like it does
with MSVC - no memory leaks and correct destructors are called.

This patch will cause clang to emit code that is compatible with code
produced by MSVC but not compatible with code produced with clang of
older versions, so the new behavior can be disabled via passing
-fclang-abi-compat=21 (or lower).

This is yet another attempt to land vector deleting destructors support
originally implemented by
https://github.com/llvm/llvm-project/pull/133451.

This PR contains fixes for issues reported in the original PR as well as
fixes for issues related to operator delete[] search reported in several
issues like

https://github.com/llvm/llvm-project/pull/133950#issuecomment-2787510484
https://github.com/llvm/llvm-project/issues/134265

Fixes https://github.com/llvm/llvm-project/issues/19772</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MSVC supports an extension allowing to delete an array of objects via
pointer whose static type doesn't match its dynamic type. This is done
via generation of special destructors - vector deleting destructors.
MSVC's virtual tables always contain a pointer to the vector deleting
destructor for classes with virtual destructors, so not having this
extension implemented causes clang to generate code that is not
compatible with the code generated by MSVC, because clang always puts a
pointer to a scalar deleting destructor to the vtable. As a bonus the
deletion of an array of polymorphic object will work just like it does
with MSVC - no memory leaks and correct destructors are called.

This patch will cause clang to emit code that is compatible with code
produced by MSVC but not compatible with code produced with clang of
older versions, so the new behavior can be disabled via passing
-fclang-abi-compat=21 (or lower).

This is yet another attempt to land vector deleting destructors support
originally implemented by
https://github.com/llvm/llvm-project/pull/133451.

This PR contains fixes for issues reported in the original PR as well as
fixes for issues related to operator delete[] search reported in several
issues like

https://github.com/llvm/llvm-project/pull/133950#issuecomment-2787510484
https://github.com/llvm/llvm-project/issues/134265

Fixes https://github.com/llvm/llvm-project/issues/19772</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Enable locate module callback for all module loading (#160199)</title>
<updated>2025-11-06T20:48:21+00:00</updated>
<author>
<name>GeorgeHuyubo</name>
<email>113479859+GeorgeHuyubo@users.noreply.github.com</email>
</author>
<published>2025-11-06T20:48:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fce58897ce82de84c8d794609132eb547b2b4871'/>
<id>fce58897ce82de84c8d794609132eb547b2b4871</id>
<content type='text'>
Main executables were bypassing the locate module callback that shared 
libraries use, preventing custom symbol file location logic from working
consistently. 

This PR fix this by
*   Adding target context to ModuleSpec
* Leveraging that context to use target search path and platform's
locate module callback in ModuleList::GetSharedModule

This ensures both main executables and shared libraries get the same 
callback treatment for symbol file resolution.

---------

Co-authored-by: George Hu &lt;hyubo@meta.com&gt;
Co-authored-by: George Hu &lt;georgehuyubo@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Main executables were bypassing the locate module callback that shared 
libraries use, preventing custom symbol file location logic from working
consistently. 

This PR fix this by
*   Adding target context to ModuleSpec
* Leveraging that context to use target search path and platform's
locate module callback in ModuleList::GetSharedModule

This ensures both main executables and shared libraries get the same 
callback treatment for symbol file resolution.

---------

Co-authored-by: George Hu &lt;hyubo@meta.com&gt;
Co-authored-by: George Hu &lt;georgehuyubo@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB][NativePDB] Add non-overlapping fields in root struct (#166243)</title>
<updated>2025-11-05T18:07:44+00:00</updated>
<author>
<name>nerix</name>
<email>nerixdev@outlook.de</email>
</author>
<published>2025-11-05T18:07:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3c162ba247d30c9d8113e66fe5d96e24156ce797'/>
<id>3c162ba247d30c9d8113e66fe5d96e24156ce797</id>
<content type='text'>
When anonymous unions are used in a struct or vice versa, their fields
are merged into the parent record when using PDB. LLDB tries to recreate
the original definition of the record _with_ the anonymous
unions/structs.

For tagged unions (like `std::optional`) where the tag followed the
anonymous union, the result was suboptimal:

```cpp
// input:
struct Foo {
  union {
    Bar b;
    char c;
  };
  bool tag;
};

// reconstructed:
struct Foo {
  union {
    Bar b;
    struct {
      char c;
      bool tag;
    };
  };
};
```

Once the algorithm is in some nested union, it can't get out.

In the above case, we can get to the correct reconstructed record if we
always add fields that don't overlap others in the root struct. So when
we see `tag`, we'll see that it comes after all other fields, so it's
possible to add it in the root `Foo`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When anonymous unions are used in a struct or vice versa, their fields
are merged into the parent record when using PDB. LLDB tries to recreate
the original definition of the record _with_ the anonymous
unions/structs.

For tagged unions (like `std::optional`) where the tag followed the
anonymous union, the result was suboptimal:

```cpp
// input:
struct Foo {
  union {
    Bar b;
    char c;
  };
  bool tag;
};

// reconstructed:
struct Foo {
  union {
    Bar b;
    struct {
      char c;
      bool tag;
    };
  };
};
```

Once the algorithm is in some nested union, it can't get out.

In the above case, we can get to the correct reconstructed record if we
always add fields that don't overlap others in the root struct. So when
we see `tag`, we'll see that it comes after all other fields, so it's
possible to add it in the root `Foo`.</pre>
</div>
</content>
</entry>
<entry>
<title>update ManualDWARFIndex::Index to use std::once (#165896)</title>
<updated>2025-10-31T22:08:39+00:00</updated>
<author>
<name>Tom Yang</name>
<email>zhenyutyang@gmail.com</email>
</author>
<published>2025-10-31T22:08:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=74d4870aa503e90a614e4bc725d670abc5f90218'/>
<id>74d4870aa503e90a614e4bc725d670abc5f90218</id>
<content type='text'>
Small change to use (what I think is) a better practice -- we were using
the `m_indexed` bool member to make sure we called `Index()` once, but
we should just use `std::once`! This change shouldn't affect
functionality.

This change may also make concurrent access to `Index()` thread-safe,
though the ManualDWARFIndex API isn't completely thread-safe due to
`Decode()`. I'm not sure if ManualDWARFIndex was ever intended to be
thread-safe.

Test Plan:

`ninja check-lldb`

Tested basic debugging workflow of a couple of large projects I had
built. Basically:
```
(lldb) target create &lt;project&gt;
(lldb) b main
(lldb) r
(lldb) step
... 
```

I A/B tested the performance of launching several modules with parallel
module loading and didn't observe any performance regressions.

---------

Co-authored-by: Tom Yang &lt;toyang@fb.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Small change to use (what I think is) a better practice -- we were using
the `m_indexed` bool member to make sure we called `Index()` once, but
we should just use `std::once`! This change shouldn't affect
functionality.

This change may also make concurrent access to `Index()` thread-safe,
though the ManualDWARFIndex API isn't completely thread-safe due to
`Decode()`. I'm not sure if ManualDWARFIndex was ever intended to be
thread-safe.

Test Plan:

`ninja check-lldb`

Tested basic debugging workflow of a couple of large projects I had
built. Basically:
```
(lldb) target create &lt;project&gt;
(lldb) b main
(lldb) r
(lldb) step
... 
```

I A/B tested the performance of launching several modules with parallel
module loading and didn't observe any performance regressions.

---------

Co-authored-by: Tom Yang &lt;toyang@fb.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][TypeSystem] Better support for _BitInt types (#165689)</title>
<updated>2025-10-31T13:27:09+00:00</updated>
<author>
<name>Michael Buch</name>
<email>michaelbuch12@gmail.com</email>
</author>
<published>2025-10-31T13:27:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=deb54ba0cbab1e9c8d2ab0ea8a6e77dbb22b82d9'/>
<id>deb54ba0cbab1e9c8d2ab0ea8a6e77dbb22b82d9</id>
<content type='text'>
Depends on:
* https://github.com/llvm/llvm-project/pull/165686

This patch ensures we make use of the `DW_AT_bit_size` on
`DW_TAG_base_type`s (which since
https://github.com/llvm/llvm-project/pull/164372 can exist on
`_BitInt`s) and adjusts `TypeSystemClang` to recognize `_BitInt`.

For DWARF from older versions of Clang that didn't emit a
`DW_AT_bit_size`, we would create `_BitInt`s using the byte-size. Not
sure we can do much better than that. But the situation beforehand
wasn't much better.

Before:
```
(lldb) v
(char) a = '\x01'
(unsigned char) b = '\x01'
(long) c = 2
(unsigned long) d = 2
```

After:
```
(lldb) v
(_BitInt(2)) a = 1
(unsigned _BitInt(2)) b = 1
(_BitInt(52)) c = 2
(unsigned _BitInt(52)) d = 2
```

Fixes https://github.com/llvm/llvm-project/issues/110273</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Depends on:
* https://github.com/llvm/llvm-project/pull/165686

This patch ensures we make use of the `DW_AT_bit_size` on
`DW_TAG_base_type`s (which since
https://github.com/llvm/llvm-project/pull/164372 can exist on
`_BitInt`s) and adjusts `TypeSystemClang` to recognize `_BitInt`.

For DWARF from older versions of Clang that didn't emit a
`DW_AT_bit_size`, we would create `_BitInt`s using the byte-size. Not
sure we can do much better than that. But the situation beforehand
wasn't much better.

Before:
```
(lldb) v
(char) a = '\x01'
(unsigned char) b = '\x01'
(long) c = 2
(unsigned long) d = 2
```

After:
```
(lldb) v
(_BitInt(2)) a = 1
(unsigned _BitInt(2)) b = 1
(_BitInt(52)) c = 2
(unsigned _BitInt(52)) d = 2
```

Fixes https://github.com/llvm/llvm-project/issues/110273</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][TypeSystem] Remove count parameter from TypeSystem::IsFloatingPointType (#165707)</title>
<updated>2025-10-31T10:18:13+00:00</updated>
<author>
<name>Michael Buch</name>
<email>michaelbuch12@gmail.com</email>
</author>
<published>2025-10-31T10:18:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b81a9927974b5b2941114b1ca6ceedb61875d988'/>
<id>b81a9927974b5b2941114b1ca6ceedb61875d988</id>
<content type='text'>
Similar motivation to https://github.com/llvm/llvm-project/pull/165702.
It was unused in all callsites and inconsistent with other APIs like
`IsIntegerType` (which doesn't take a `count` parameter).

If we ever need a "how many elements does this type represent", we can
implement one with a new TypeSystem API that does exactly that.

Some callsites checked for `count == 1` previously, but I suspect what
they intended to do is check for whether it's a vector type or complex
type, before reading the FP register. I'm somewhat confident that's the
case because the `TypeSystemClang::GetTypeInfo` currently incorrectly
sets the integer and floating point bits for complex and vector types
(will fix separately). But some architectures might choose to pass
single-element vectors in scalar registers. I should probably changes
these to check the vector element size.

All the `count == 2 &amp;&amp; is_complex` were redundant because `count == 2`
iff `is_complex == true`. So I just removed the count check there.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar motivation to https://github.com/llvm/llvm-project/pull/165702.
It was unused in all callsites and inconsistent with other APIs like
`IsIntegerType` (which doesn't take a `count` parameter).

If we ever need a "how many elements does this type represent", we can
implement one with a new TypeSystem API that does exactly that.

Some callsites checked for `count == 1` previously, but I suspect what
they intended to do is check for whether it's a vector type or complex
type, before reading the FP register. I'm somewhat confident that's the
case because the `TypeSystemClang::GetTypeInfo` currently incorrectly
sets the integer and floating point bits for complex and vector types
(will fix separately). But some architectures might choose to pass
single-element vectors in scalar registers. I should probably changes
these to check the vector element size.

All the `count == 2 &amp;&amp; is_complex` were redundant because `count == 2`
iff `is_complex == true`. So I just removed the count check there.</pre>
</div>
</content>
</entry>
</feed>
