llvm-project/lldb/source/Plugins/Language/ObjC
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
..
CF.cpp [lldb] Fix NSDate test after Scalar change 2020-07-01 16:00:10 +02:00
CF.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CFBasicHash.cpp [lldb/Dataformatter] Add support for CoreFoundation Dictionaries and Sets. 2020-04-27 22:10:11 +02:00
CFBasicHash.h [lldb] Remove redundant access specifiers (NFC) 2020-06-15 21:34:13 -07:00
CMakeLists.txt [lldb/Dataformatter] Add support for CoreFoundation Dictionaries and Sets. 2020-04-27 22:10:11 +02:00
Cocoa.cpp [LLDB] Add checks for ValueObjectSP in Cocoa summary providers 2020-07-29 14:47:18 -07:00
Cocoa.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CoreMedia.cpp [lldb] Remove assumption from Clang-based data formatters that their types are in the scratch AST 2020-12-10 17:35:03 +01:00
CoreMedia.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
NSArray.cpp [lldb][NFC] Rename TypeSystemClang::GetScratch to ScratchTypeSystemClang::GetForTarget 2020-12-04 11:29:08 +01:00
NSDictionary.cpp [lldb][NFC] Rename TypeSystemClang::GetScratch to ScratchTypeSystemClang::GetForTarget 2020-12-04 11:29:08 +01:00
NSDictionary.h [lldb/Dataformatter] Add support for CoreFoundation Dictionaries and Sets. 2020-04-27 22:10:11 +02:00
NSError.cpp [lldb][NFC] Rename TypeSystemClang::GetScratch to ScratchTypeSystemClang::GetForTarget 2020-12-04 11:29:08 +01:00
NSException.cpp [lldb][NFC] Rename TypeSystemClang::GetScratch to ScratchTypeSystemClang::GetForTarget 2020-12-04 11:29:08 +01:00
NSIndexPath.cpp [lldb][NFC] Rename TypeSystemClang::GetScratch to ScratchTypeSystemClang::GetForTarget 2020-12-04 11:29:08 +01:00
NSSet.cpp [lldb/Dataformatter] Add support to CF{Dictionary,Set}Ref types 2020-05-15 22:14:39 +02:00
NSSet.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
NSString.cpp [lldb][NFC] Rename TypeSystemClang::GetScratch to ScratchTypeSystemClang::GetForTarget 2020-12-04 11:29:08 +01:00
NSString.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
ObjCLanguage.cpp [lldb/Dataformatter] Add support to CF{Dictionary,Set}Ref types 2020-05-15 22:14:39 +02:00
ObjCLanguage.h [lldb/DataFormatters] Display null C++ pointers as nullptr 2020-11-12 15:24:06 -08:00