llvm-project/lldb/source/Plugins/Language/CPlusPlus
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
..
BlockPointer.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
BlockPointer.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CMakeLists.txt [lldb] Move clang-based files out of Symbol 2020-01-31 12:20:10 -08:00
CPlusPlusLanguage.cpp [lldb/DataFormatters] Display null C++ pointers as nullptr 2020-11-12 15:24:06 -08:00
CPlusPlusLanguage.h [lldb/DataFormatters] Display null C++ pointers as nullptr 2020-11-12 15:24:06 -08:00
CPlusPlusNameParser.cpp [LLDB] Initialize temporary token 2020-03-30 16:12:50 +02:00
CPlusPlusNameParser.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CxxStringTypes.cpp [lldb] Move clang-based files out of Symbol 2020-01-31 12:20:10 -08:00
CxxStringTypes.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
LibCxx.cpp [lldb][NFC] Rename TypeSystemClang::GetScratch to ScratchTypeSystemClang::GetForTarget 2020-12-04 11:29:08 +01:00
LibCxx.h [DataFormatters] Add formatter for libc++ std::unique_ptr 2020-03-23 11:48:20 -07:00
LibCxxAtomic.cpp [lldb] Don't model std::atomic as a transparent data structure in the data formatter 2020-02-18 11:22:12 +01:00
LibCxxAtomic.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
LibCxxBitset.cpp [lldb] Move clang-based files out of Symbol 2020-01-31 12:20:10 -08:00
LibCxxInitializerList.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
LibCxxList.cpp [DataFormatters] Add formatter for libc++ std::unique_ptr 2020-03-23 11:48:20 -07:00
LibCxxMap.cpp [lldb] Move clang-based files out of Symbol 2020-01-31 12:20:10 -08:00
LibCxxOptional.cpp [lldb][NFC] Don't hide a bool in LibCxxOptional's OptionalFrontend::m_size 2020-02-10 13:03:06 +01:00
LibCxxQueue.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
LibCxxTuple.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
LibCxxUnorderedMap.cpp [lldb] Move clang-based files out of Symbol 2020-01-31 12:20:10 -08:00
LibCxxVariant.cpp [lldb] Let TypeSystemClang::GetDisplayTypeName remove anonymous and inline namespaces. 2020-02-19 10:30:11 +01:00
LibCxxVariant.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
LibCxxVector.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
LibStdcpp.cpp Reland [lldb] Fix string summary of an empty NSPathStore2 2020-03-19 18:50:26 +01:00
LibStdcpp.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
LibStdcppTuple.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
LibStdcppUniquePointer.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
MSVCUndecoratedNameParser.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
MSVCUndecoratedNameParser.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00