llvm-project/lldb/source/Plugins/Language
Raphael Isemann 839e845277 [lldb] Remove assumption from Clang-based data formatters that their types are in the scratch AST
Several data formatters assume their types are in the Target's scratch AST and
build new types from that scratch AST instance. However, types from different
ASTs shouldn't be mixed, so this (unchecked) assumption may lead to problems if
we ever have more than one scratch AST or someone somehow invokes data
formatters on a type that are not in the scratch AST.

Instead we can use in all the formatters just the TypeSystem of the type we're
formatting. That's much simpler and avoids all the headache of finding the right
TypeSystem that matches the one of the formatted type.

Right now LLDB only has one scratch TypeSystemClang instance and we format only
types that are in the scratch AST, so this doesn't change anything in the
current way LLDB works. The intention here is to allow follow up refactorings
that introduce multiple scratch ASTs with the same Target.

Differential Revision: https://reviews.llvm.org/D92757
2020-12-10 17:35:03 +01:00
..
CPlusPlus [lldb] Remove assumption from Clang-based data formatters that their types are in the scratch AST 2020-12-10 17:35:03 +01:00
ClangCommon lldb: Migrate to MemoryBufferRef for createFileID (after 51d1d585e5) 2020-10-20 13:52:39 -04:00
ObjC [lldb] Remove assumption from Clang-based data formatters that their types are in the scratch AST 2020-12-10 17:35:03 +01:00
ObjCPlusPlus [lldb/DataFormatters] Display null C++ pointers as nullptr 2020-11-12 15:24:06 -08:00
CMakeLists.txt Remove OCaml debugger plugin 2018-11-05 19:34:03 +00:00