summaryrefslogtreecommitdiff
path: root/lldb/source/Symbol/CompilerType.cpp
AgeCommit message (Collapse)Author
2025-10-31[lldb][TypeSystem] Remove count parameter from ↵Michael Buch
TypeSystem::IsFloatingPointType (#165707) 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 && is_complex` were redundant because `count == 2` iff `is_complex == true`. So I just removed the count check there.
2025-10-31[lldb][TypeSystem] Remove count parameter from TypeSystem::GetEncoding (#165702)Michael Buch
There were a couple of quirks with this parameter: 1. It wasn't being set consistently. E.g., vector types would be of count `1` but complex types would be `2`. Hence, it wasn't clear what count was referring to. 2. `count` was not being set if the input type was invalid, possibly leaving the input reference uninitialized. 3. Only one callsite actually made use of `count`, and that in itself seems like it could be improved (added a FIXME). 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.
2025-07-23[lldb][SBType] GetBasicType to unwrap canonical type (#149112)Michael Buch
`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
2025-05-12[lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (#135843)Ilia Kuklin
Add a function `GetDereferencedType` to `CompilerType` and allow `TypeSystemClang` to dereference arrays.
2025-04-30[lldb] Upgrade `GetIndexOfChildWithName` to use `llvm::Expected` (#136693)Charles Zablit
This patch replaces the use of `UINT32_MAX` as the error return value of `GetIndexOfChildWithName` with `llvm::Expected`. # Tasks to do in another PR 1. Replace `CalculateNumChildrenIgnoringErrors` with `CalculateNumChildren`. See [this comment](https://github.com/llvm/llvm-project/pull/136693#discussion_r2056319358). 2. Update `lldb_private::formatters::ExtractIndexFromString` to use `llvm::Expected`. See [this comment](https://github.com/llvm/llvm-project/pull/136693#discussion_r2054217536). 3. Create a new class which carries both user and internal errors. See [this comment](https://github.com/llvm/llvm-project/pull/136693#discussion_r2056439608).
2025-04-17[lldb] Remove CompilerType::GetIndexOfFieldWithName (#135963)Charles Zablit
This patch removes the unused `CompilerType::GetIndexOfFieldWithName` API (it wasn't used apart from in a single testcase). Given we have so many similarly named APIs already, it's best not to maintain this API that's not really used (and isnt tested).
2025-03-05[lldb] Upgrade CompilerType::GetBitSize to return llvm::Expected (#129601)Adrian Prantl
This patch pushes the error handling boundary for the GetBitSize() methods from Runtime into the Type and CompilerType APIs. This makes it easier to diagnose problems thanks to more meaningful error messages being available. GetBitSize() is often the first thing LLDB asks about a type, so this method is particularly important for a better user experience. rdar://145667239
2025-01-16[lldb] Handle a byte size of zero in CompilerType::GetValueAsScalar (#123107)Jonas Devlieghere
A bit or byte size of 0 is not a bug. It can legitimately (and frequently) happen in Swift and C, just not in C++. However, it doesn't make sense to read a scalar of zero bytes. Currently, when this happens, we trigger an `lldb_assert` in the data extractor and return 0, which isn't accurate. I have a bunch of reports of the assert triggering, but nobody has been able to provide me with a reproducer that I can turn into a test and I wasn't able to concoct a test case by reverse-engineering the code. rdar://141630334
2024-10-18[lldb] Add GetMangledTypeName to TypeSystem/CompilerType (#113006)Augusto Noronha
Swift types have mangled names, so there should be a way to read those from the compiler type. This patch upstreams these two changes from swiftlang/llvm-project (which were added there since at least 2016).
2024-05-23Add a createError variant without error code (NFC) (#93209)Adrian Prantl
For the significant amount of call sites that want to create an incontrovertible error, such a wrapper function creates a significant readability improvement and lowers the cost of entry to add error handling in more places.
2024-05-22Change GetChildCompilerTypeAtIndex to return Expected (NFC) (#92979)Adrian Prantl
This change is a general improvement of the internal API. My motivation is to use this in the Swift typesystem plugin.
2024-04-30[PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions ↵Daniil Kovalev
(#84387) Depends on #84384 and #90329 This adds support for `DW_TAG_LLVM_ptrauth_type` entries corresponding to explicitly signed types (e.g. free function pointers) in lldb user expressions. Applies PR https://github.com/apple/llvm-project/pull/8239 from Apple's downstream and also adds tests and related code. --------- Co-authored-by: Jonas Devlieghere <jonas@devlieghere.com>
2024-04-25[lldb] Add SB API to access static constexpr member values (#89730)Pavel Labath
The main change is the addition of a new SBTypeStaticField class, representing a static member of a class. It can be retrieved created through SBType::GetStaticFieldWithName. It contains several methods (GetName, GetMangledName, etc.) whose meaning is hopefully obvious. The most interesting method is lldb::SBValue GetConstantValue(lldb::SBTarget) which returns a the value of the field -- if it is a compile time constant. The reason for that is that only constants have their values represented in the clang AST. For non-constants, we need to go back to the module containing that constant, and ask retrieve the associated ValueObjectVariable. That's easy enough if the we are still in the type system of the module (because then the type system will contain the pointer to the module symbol file), but it's hard when the type has been copied into another AST (e.g. during expression evaluation). To do that we would need to walk the ast import chain backwards to find the source TypeSystem, and I haven't found a nice way to do that. Another possibility would be to use the mangled name of the variable to perform a lookup (in all modules). That is sort of what happens when evaluating the variable in an expression (which does work), but I did not want to commit to that implementation as it's not necessary for my use case (and if anyone wants to, he can use the GetMangledName function and perform the lookup manually). The patch adds a couple of new TypeSystem functions to surface the information needed to implement this functionality.
2024-04-19[lldb] Make SBType::FindDirectNestedType work with expression ASTs (#89183)Pavel Labath
The types we get out of expressions will not have an associated symbol file, so the current method of looking up the type will fail. Instead, I plumb the query through the TypeSystem class. This correctly finds the type in both cases (importing it into the expression AST if needed). I haven't measured, but it should also be more efficient than doing a type lookup (at least, after the type has already been found once).
2024-03-11Report back errors in GetNumChildren() (#84265)Adrian Prantl
This is a proof-of-concept patch that illustrates how to use the Expected return values to surface rich error messages all the way up to the ValueObjectPrinter. This is the final patch in the series that includes https://github.com/llvm/llvm-project/pull/83501 and https://github.com/llvm/llvm-project/pull/84219
2024-03-08Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected ↵Adrian Prantl
(#84219) Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected This is an NFC change that does not yet add any error handling or change any code to return any errors. This is the second big change in the patch series started with https://github.com/llvm/llvm-project/pull/83501 A follow-up PR will wire up error handling.
2024-03-08Revert "Change GetNumChildren()/CalculateNumChildren() methods return ↵Florian Mayer
llvm::Expected (#84219)" This reverts commit 99118c809367d518ffe4de60c16da953744b68b9.
2024-03-08Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected ↵Adrian Prantl
(#84219) Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected This is an NFC change that does not yet add any error handling or change any code to return any errors. This is the second big change in the patch series started with https://github.com/llvm/llvm-project/pull/83501 A follow-up PR will wire up error handling.
2023-12-14[LLDB] Add more helper functions to CompilerType class (second try). (#73472)cmtice
This adds 23 new helper functions to LLDB's CompilerType class, things like IsSmartPtrType, IsPromotableIntegerType, GetNumberofNonEmptyBaseClasses, and GetTemplateArgumentType (to name a few). It also has run clang-format on the files CompilerType.{h,cpp}. These helper functions are needed as part of the implementation for the Data Inspection Language, (see https://discourse.llvm.org/t/rfc-data-inspection-language/69893).
2023-11-26Revert "[LLDB] Add more helper functions to CompilerType class."Caroline Tice
PR 73467 was committed by accident. This undoes the premature commit.
2023-11-26[LLDB] Add more helper functions to CompilerType class. (#73467)cmtice
This adds 23 new helper functions to LLDB's CompilerType class, things like IsSmartPtrType, IsPromotableIntegerType, GetNumberofNonEmptyBaseClasses, and GetTemplateArgumentType (to name a few). These helper functions are needed as part of the implementation for the Data Inspection Language, (see https://discourse.llvm.org/t/rfc-data-inspection-language/69893).
2023-10-17[LLDB][NFC] Move some constructors to their cpp filewalter erquinigo
CompilerType constructors rely on the NDEBUG macro, so it's better to move them to their cpp file so that the header doesn't get confused when this macro is used differently for other compilation units.
2023-10-13[LLDB][NFC] Remove dead code (#68927)Walter Erquinigo
I found some type/typesystem code that is dead and some of it seems to have been replaced by the ValueObjectPrinter.
2023-08-09[lldb] Sink StreamFile into lldbHostAlex Langford
StreamFile subclasses Stream (from lldbUtility) and is backed by a File (from lldbHost). It does not depend on anything from lldbCore or any of its sibling libraries, so I think it makes sense for this to live in lldbHost instead. Differential Revision: https://reviews.llvm.org/D157460
2023-07-07[lldb][NFCI] Remove use of Stream * from TypeSystemAlex Langford
We always assume these streams are valid, might as well take references instead of raw pointers. Differential Revision: https://reviews.llvm.org/D154549
2023-06-01[lldb] Take StringRef name in GetIndexOfChildWithName (NFC)Dave Lee
As with D151615, which changed `GetIndexOfChildMemberWithName` to take a `StringRef` instead of a `ConstString`, this change does the same for `GetIndexOfChildWithName`. Differential Revision: https://reviews.llvm.org/D151811
2023-05-31[lldb] Take StringRef name in GetIndexOfChildMemberWithName (NFC)Dave Lee
Change the type of the `name` parameter from `char *` to `StringRef`. Follow up to D151615. Differential Revision: https://reviews.llvm.org/D151810
2023-03-07Reland "[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider ↵Michael Buch
for member-function pointers" With this patch member-function pointers are formatted using `CXXFunctionPointerSummaryProvider`. This turns, ``` (lldb) v pointer_to_member_func (void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 ``` into ``` (lldb) v pointer_to_member_func (void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 (a.out`Foo::member_func() at main.cpp:3) ``` Differential Revision: https://reviews.llvm.org/D145242
2023-03-07Revert "[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider ↵Michael Buch
for member-function pointers" Reverted because Windows buildbot started failing This reverts commit 6bd46e713c6d8deda7bdae8b1efadb99c88b4443.
2023-03-03[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for ↵Michael Buch
member-function pointers With this patch member-function pointers are formatted using `CXXFunctionPointerSummaryProvider`. This turns, ``` (lldb) v pointer_to_member_func (void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 ``` into ``` (lldb) v pointer_to_member_func (void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 (a.out`Foo::member_func() at main.cpp:3) ``` Differential Revision: https://reviews.llvm.org/D145242
2023-01-07[lldb] Use std::optional instead of llvm::Optional (NFC)Kazu Hirata
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to clean up the "using" declarations, #include "llvm/ADT/Optional.h", etc. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2023-01-07[lldb] Add #include <optional> (NFC)Kazu Hirata
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>. I'll post a separate patch to actually replace llvm::Optional with std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-12-20[lldb] Prevent false positives with simple template names in ↵Arthur Eubanks
SymbolFileDWARF::FindTypes The provided test case was crashing because of confusion attempting to find types for `ns::Foo` under -gsimple-template-names. (This looks broken normally because it's attempting to find `ns::Foo` rather than `ns::Foo<T>`) Looking up types can't give false positives, as opposed to looking up functions as mentioned in https://reviews.llvm.org/D137098. Reviewed By: Michael137 Differential Revision: https://reviews.llvm.org/D140240
2022-12-04[lldb] Use std::nullopt instead of None (NFC)Kazu Hirata
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-11-23Unbreak lldb build broken by d941fceca8e9Benjamin Kramer
2022-11-23Add the ability to see when a type in incomplete.Greg Clayton
-flimit-debug-info and other compiler options might end up removing debug info that is needed for debugging. LLDB marks these types as being forcefully completed in the metadata in the TypeSystem. These types should have been complete in the debug info but were not because the compiler omitted them to save space. When we can't find a suitable replacement for the type, we should let the user know that these types are incomplete to indicate there was an issue instead of just showing nothing for a type. The solution is to display presented in this patch is to display "<incomplete type>" as the summary for any incomplete types. If there is a summary string or function that is provided for a type, but the type is currently forcefully completed, the installed summary will be ignored and we will display "<incomplete type>". This patch also exposes the ability to ask a SBType if it was forcefully completed with: bool SBType::IsTypeForcefullyCompleted(); This will allow the user interface for a debugger to also detect this issue and possibly mark the variable display up on some way to indicate to the user the type is incomplete. To show how this is diplayed, we can look at the existing output first for the example source file from the file: lldb/test/API/functionalities/limit-debug-info/main.cpp (lldb) frame variable inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one (InheritsFromOne) ::inherits_from_one = (member = 47) (InheritsFromTwo) ::inherits_from_two = (member = 47) (OneAsMember) ::one_as_member = (one = member::One @ 0x0000000100008028, member = 47) (TwoAsMember) ::two_as_member = (two = member::Two @ 0x0000000100008040, member = 47) (array::One [3]) ::array_of_one = ([0] = array::One @ 0x0000000100008068, [1] = array::One @ 0x0000000100008069, [2] = array::One @ 0x000000010000806a) (array::Two [3]) ::array_of_two = ([0] = array::Two @ 0x0000000100008098, [1] = array::Two @ 0x0000000100008099, [2] = array::Two @ 0x000000010000809a) (ShadowedOne) ::shadowed_one = (member = 47) (lldb) frame variable --show-types inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one (InheritsFromOne) ::inherits_from_one = { (int) member = 47 } (InheritsFromTwo) ::inherits_from_two = { (int) member = 47 } (OneAsMember) ::one_as_member = { (member::One) one = {} (int) member = 47 } (TwoAsMember) ::two_as_member = { (member::Two) two = {} (int) member = 47 } (array::One [3]) ::array_of_one = { (array::One) [0] = {} (array::One) [1] = {} (array::One) [2] = {} } (array::Two [3]) ::array_of_two = { (array::Two) [0] = {} (array::Two) [1] = {} (array::Two) [2] = {} } (ShadowedOne) ::shadowed_one = { (int) member = 47 } With this patch in place we can now see any classes that were forcefully completed to let us know that we are missing information: (lldb) frame variable inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one (InheritsFromOne) ::inherits_from_one = (One = <incomplete type>, member = 47) (InheritsFromTwo) ::inherits_from_two = (Two = <incomplete type>, member = 47) (OneAsMember) ::one_as_member = (one = <incomplete type>, member = 47) (TwoAsMember) ::two_as_member = (two = <incomplete type>, member = 47) (array::One[3]) ::array_of_one = ([0] = <incomplete type>, [1] = <incomplete type>, [2] = <incomplete type>) (array::Two[3]) ::array_of_two = ([0] = <incomplete type>, [1] = <incomplete type>, [2] = <incomplete type>) (ShadowedOne) ::shadowed_one = (func_shadow::One = <incomplete type>, member = 47) (lldb) frame variable --show-types inherits_from_one inherits_from_two one_as_member two_as_member array_of_one array_of_two shadowed_one (InheritsFromOne) ::inherits_from_one = { (One) One = <incomplete type> {} (int) member = 47 } (InheritsFromTwo) ::inherits_from_two = { (Two) Two = <incomplete type> {} (int) member = 47 } (OneAsMember) ::one_as_member = { (member::One) one = <incomplete type> {} (int) member = 47 } (TwoAsMember) ::two_as_member = { (member::Two) two = <incomplete type> {} (int) member = 47 } (array::One[3]) ::array_of_one = { (array::One) [0] = <incomplete type> {} (array::One) [1] = <incomplete type> {} (array::One) [2] = <incomplete type> {} } (array::Two[3]) ::array_of_two = { (array::Two) [0] = <incomplete type> {} (array::Two) [1] = <incomplete type> {} (array::Two) [2] = <incomplete type> {} } (ShadowedOne) ::shadowed_one = { (func_shadow::One) func_shadow::One = <incomplete type> {} (int) member = 47 } Differential Revision: https://reviews.llvm.org/D138259
2022-11-16Make CompilerType safeAdrian Prantl
When a process gets restarted TypeSystem objects associated with it may get deleted, and any CompilerType objects holding on to a reference to that type system are a use-after-free in waiting. Because of the SBAPI, we don't have tight control over where CompilerTypes go and when they are used. This is particularly a problem in the Swift plugin, where the scratch TypeSystem can be restarted while the process is still running. The Swift plugin has a lock to prevent abuse, but where there's a lock there can be bugs. This patch changes CompilerType to store a std::weak_ptr<TypeSystem>. Most of the std::weak_ptr<TypeSystem>* uglyness is hidden by introducing a wrapper class CompilerType::WrappedTypeSystem that has a dyn_cast_or_null() method. The only sites that need to know about the weak pointer implementation detail are the ones that deal with creating TypeSystems. rdar://101505232 Differential Revision: https://reviews.llvm.org/D136650
2022-11-01[lldb] Don't crash when printing static enum members with bool as underlying ↵Arthur Eubanks
type Undoes a lot of the code added in D135169 to piggyback off of the enum logic in `TypeSystemClang::SetIntegerInitializerForVariable()`. Fixes #58383. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D137045
2022-10-28[lldb] Support simplified template namesArthur Eubanks
See https://discourse.llvm.org/t/dwarf-using-simplified-template-names/58417 for background on simplified template names. lldb doesn't work with simplified template names because it uses DW_AT_name which doesn't contain template parameters under simplified template names. Two major changes are required to make lldb work with simplified template names. 1) When building clang ASTs for struct-like dies, we use the name as a cache key. To distinguish between different instantiations of a template class, we need to add in the template parameters. 2) When looking up types, if the requested type name contains '<' and we didn't initially find any types from the index searching the name, strip the template parameters and search the index, then filter out results with non-matching template parameters. This takes advantage of the clang AST's ability to print full names rather than doing it by ourself. An alternative is to fix up the names in the index to contain the fully qualified name, but that doesn't respect .debug_names. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D134378
2022-10-07[LLDB] Fix printing a static bool struct member when using "image lookup -t"David Spickett
Fixes #58135 Somehow lldb was able to print the member on its own but when we try to print the whole type found by "image lookup -t" lldb would crash. This is because we'd encoded the initial value of the member as an integer. Which isn't the end of the world because bool is integral for C++. However, clang has a special AST node to handle literal bool and it expected us to use that instead. This adds a new codepath to handle static bool which uses cxxBoolLiteralExpr and we get the member printed as you'd expect. For testing I added a struct with just the bool because trying to print all of "A" crashes as well. Presumably because one of the other member's types isn't handled properly either. So for now I just added the bool case, we can merge it with A later. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D135169
2022-08-16[lldb] Automatically unwrap parameter packs in template argument accessorsJonas Devlieghere
When looking at template arguments in LLDB, we usually care about what the user passed in his code, not whether some of those arguments where passed as a variadic parameter pack. This patch extends all the C++ APIs to look at template parameters to take an additional 'expand_pack' boolean that automatically unwraps the potential argument packs. The equivalent SBAPI calls have been changed to pass true for this parameter. A byproduct of the patch is to also fix the support for template type that have only a parameter pack as argument (like the OnlyPack type in the test). Those were not recognized as template instanciations before. The added test verifies that the SBAPI is able to iterate over the arguments of a variadic template. The original patch was written by Fred Riss almost 4 years ago. Differential revision: https://reviews.llvm.org/D51387
2021-02-23[lldb][NFC] Give CompilerType's IsArrayType/IsVectorType/IsBlockPointerType ↵Raphael Isemann
out-parameters default values We already do this for most functions that have out-parameters, so let's do the same here and avoid all the `nullptr, nullptr, nullptr` in every call.
2020-12-22[lldb] Add SBType::GetEnumerationIntegerType methodAndy Yankovsky
Add a method for getting the enumeration underlying type. Differential revision: https://reviews.llvm.org/D93696
2020-12-22[lldb] Add SBType::IsScopedEnumerationType methodAndy Yankovsky
Add a method to check if the type is a scoped enumeration (i.e. "enum class/struct"). Differential revision: https://reviews.llvm.org/D93690
2020-12-08[lldb] Remove unused IsFunctionType is_variadic_ptr parameter (NFC)Dave Lee
`is_variadic_ptr` is unused. Differential Revision: https://reviews.llvm.org/D92778
2020-08-17[lldb][NFC] Remove stride parameter from GetArrayElementTypeRaphael Isemann
This parameter isn't used anywhere in LLDB nor the Swift downstream branch. It also doesn't really fit into the TypeSystem APIs that usually don't return additional related functionality via some output parameters. Also the implementations already states that the calculated value there is wrong. Let's remove it. If we need this functionality at some point then Swift's much nicer `GetByteStride` function seems like the way to go. Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D84299
2020-07-22Thread ExecutionContextScope through GetByteSize where possible (NFC-ish)Adrian Prantl
This patch has no effect for C and C++. In more dynamic languages, such as Objective-C and Swift GetByteSize() needs to call into the language runtime, so it's important to pass one in where possible. My primary motivation for this is some work I'm doing on the Swift branch, however, it looks like we are also seeing warnings in Objective-C that this may resolve. Everything in the SymbolFile hierarchy still passes in nullptrs, because we don't have an execution context in SymbolFile, since SymbolFile transcends processes. Differential Revision: https://reviews.llvm.org/D84267
2020-06-19[lldb][NFC] Remove unused DEPTH_INCREMENT in CompilerType.cppRaphael Isemann
2020-04-17Allow lldb-test to combine -find with -dump-clang-astAdrian Prantl
This patch threads an lldb::DescriptionLevel through the typesystem to allow dumping the full Clang AST (level=verbose) of any lldb::Type in addition to the human-readable source description (default level=full). This type dumping interface is currently not exposed through the SBAPI. The application is to let lldb-test dump the clang AST of search results. I need this to test lazy type completion of clang types in subsequent patches. Differential Revision: https://reviews.llvm.org/D78329
2020-04-09Preserve the owning module information from DWARF in the synthesized ASTAdrian Prantl
Types that came from a Clang module are nested in DW_TAG_module tags in DWARF. This patch recreates the Clang module hierarchy in LLDB and 1;95;0csets the owning module information accordingly. My primary motivation is to facilitate looking up per-module APINotes for individual declarations, but this likely also has other applications. This reapplies the previously reverted commit, but without support for ClassTemplateSpecializations, which I'm going to look into separately. rdar://problem/59634380 Differential Revision: https://reviews.llvm.org/D75488