[all-commits] [llvm/llvm-project] b7889a: [lldb][SBType] GetBasicType to unwrap canonical ty...
Michael Buch via All-commits
all-commits at lists.llvm.org
Wed Jul 23 00:53:12 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b7889a65a8e54f2d9c7f578a515a7bf970044bfe
https://github.com/llvm/llvm-project/commit/b7889a65a8e54f2d9c7f578a515a7bf970044bfe
Author: Michael Buch <michaelbuch12 at gmail.com>
Date: 2025-07-23 (Wed, 23 Jul 2025)
Changed paths:
M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
M lldb/source/Symbol/CompilerType.cpp
M lldb/source/ValueObject/ValueObject.cpp
A lldb/test/API/python_api/sbtype_basic_type/Makefile
A lldb/test/API/python_api/sbtype_basic_type/TestSBTypeBasicType.py
A lldb/test/API/python_api/sbtype_basic_type/main.cpp
Log Message:
-----------
[lldb][SBType] GetBasicType to unwrap canonical type (#149112)
`SBType::GetBasicType` fails on typedefs to primitive types. The docs
for `GetBasicType` state:
```
Returns the BasicType value that is most appropriate to this type
```
But, e.g., for `uint64_t` this would currently return
`eBasicTypeInvalid`.
`TypeSystemClang::GetBasicTypeEnumeration` (which is what
`SBType::GetBasicType` uses) doesn't see through typedefs. Inside LLDB
we almost always call `GetBasicTypeEnumeration` on the canonical type.
In the cases we don't I suspect those were just subtle bugs. This patch
gets the canonical type inside of `GetBasicTypeEnumeration` instead.
rdar://155829208
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list