oontvoo wrote: > I would be nice if we can detect if we support Swift dynamically. Internally > in LLDB, we can ask for a TypeSystem by language using: > > ``` > llvm::Expected<lldb::TypeSystemSP> > TypeSystemMap::GetTypeSystemForLanguage(lldb::LanguageType language, > Module *module, bool can_create); > llvm::Expected<lldb::TypeSystemSP> > TypeSystemMap::GetTypeSystemForLanguage(lldb::LanguageType language, > Target *target, bool can_create); > ``` > > These functions will return respectively: > > ``` > TypeSystem::CreateInstance(language, module); > TypeSystem::CreateInstance(language, target); > ``` > > We should be able to add a new static method to the TypeSystem.h/.cpp that > can answer if a language is supported with something like: > > ``` > static bool TypeSystem::SupportsLanguage(lldb::LanguageType language); > ``` > > Each TypeSystem plugin can register a new callback that can answer if they > support a language. Then we can add a static function on SBDebugger that > would expose this function with something like: > > ``` > static bool SBDebugger::SupportsLanguage(lldb::LanguageType language); > ``` > > I will make comments in the DAP.cpp where this would be used.
Done! https://github.com/llvm/llvm-project/pull/87550 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits