|
LLDB mainline
|
#include <TypeSystem.h>
Public Member Functions | |
| TypeSystemMap () | |
| ~TypeSystemMap () | |
| void | Clear () |
| void | ForEach (std::function< bool(lldb::TypeSystemSP)> const &callback) |
| llvm::Expected< lldb::TypeSystemSP > | GetTypeSystemForLanguage (lldb::LanguageType language, Module *module, bool can_create) |
| llvm::Expected< lldb::TypeSystemSP > | GetTypeSystemForLanguage (lldb::LanguageType language, Target *target, bool can_create) |
| bool | GetHasForcefullyCompletedTypes () const |
| Check all type systems in the map to see if any have forcefully completed types;. | |
Protected Types | |
| typedef llvm::DenseMap< uint16_t, lldb::TypeSystemSP > | collection |
Protected Attributes | |
| std::mutex | m_mutex |
| A mutex to keep this object happy in multi-threaded environments. | |
| collection | m_map |
| bool | m_clear_in_progress = false |
Private Types | |
| typedef llvm::function_ref< lldb::TypeSystemSP()> | CreateCallback |
Private Member Functions | |
| llvm::Expected< lldb::TypeSystemSP > | GetTypeSystemForLanguage (lldb::LanguageType language, std::optional< CreateCallback > create_callback=std::nullopt) |
| Finds the type system for the given language. | |
Definition at line 559 of file TypeSystem.h.
|
protected |
Definition at line 584 of file TypeSystem.h.
|
private |
Definition at line 591 of file TypeSystem.h.
| TypeSystemMap::TypeSystemMap | ( | ) |
Definition at line 215 of file TypeSystem.cpp.
|
default |
| void TypeSystemMap::Clear | ( | ) |
Definition at line 219 of file TypeSystem.cpp.
References m_clear_in_progress, m_map, and m_mutex.
| void TypeSystemMap::ForEach | ( | std::function< bool(lldb::TypeSystemSP)> const & | callback | ) |
Definition at line 242 of file TypeSystem.cpp.
| bool lldb_private::TypeSystemMap::GetHasForcefullyCompletedTypes | ( | ) | const |
Check all type systems in the map to see if any have forcefully completed types;.
| llvm::Expected< lldb::TypeSystemSP > TypeSystemMap::GetTypeSystemForLanguage | ( | lldb::LanguageType | language, |
| Module * | module, | ||
| bool | can_create ) |
Definition at line 320 of file TypeSystem.cpp.
References lldb_private::TypeSystem::CreateInstance(), and GetTypeSystemForLanguage().
Referenced by GetTypeSystemForLanguage(), and GetTypeSystemForLanguage().
|
private |
Finds the type system for the given language.
If no type system could be found for a language and a CreateCallback was provided, the value returned by the callback will be treated as the TypeSystem for the language.
| language | The language for which the type system should be found. |
| create_callback | A callback that will be called if no previously created TypeSystem that fits the given language could found. Can be omitted if a non-existent type system should be treated as an error instead. |
Definition at line 269 of file TypeSystem.cpp.
References lldb_private::Language::GetNameForLanguageType(), m_clear_in_progress, m_map, and m_mutex.
| llvm::Expected< lldb::TypeSystemSP > TypeSystemMap::GetTypeSystemForLanguage | ( | lldb::LanguageType | language, |
| Target * | target, | ||
| bool | can_create ) |
Definition at line 332 of file TypeSystem.cpp.
References lldb_private::TypeSystem::CreateInstance(), and GetTypeSystemForLanguage().
|
protected |
Definition at line 588 of file TypeSystem.h.
Referenced by Clear(), and GetTypeSystemForLanguage().
|
protected |
Definition at line 587 of file TypeSystem.h.
Referenced by Clear(), ForEach(), GetTypeSystemForLanguage(), and TypeSystemMap().
|
mutableprotected |
A mutex to keep this object happy in multi-threaded environments.
Definition at line 585 of file TypeSystem.h.
Referenced by Clear(), ForEach(), GetTypeSystemForLanguage(), and TypeSystemMap().