mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
[lldb] Remove the global platform list
This patch moves the platform creation and selection logic into the per-debugger platform lists. I've tried to keep functional changes to a minimum -- the main (only) observable difference in this change is that APIs, which select a platform by name (e.g., Debugger::SetCurrentPlatform) will not automatically pick up a platform associated with another debugger (or no debugger at all). I've also added several tests for this functionality -- one of the pleasant consequences of the debugger isolation is that it is now possible to test the platform selection and creation logic. This is a product of the discussion at <https://discourse.llvm.org/t/multiple-platforms-with-the-same-name/59594>. Differential Revision: https://reviews.llvm.org/D120810
This commit is contained in:
@@ -293,9 +293,7 @@ SBPlatform::SBPlatform() { LLDB_INSTRUMENT_VA(this); }
|
||||
SBPlatform::SBPlatform(const char *platform_name) {
|
||||
LLDB_INSTRUMENT_VA(this, platform_name);
|
||||
|
||||
Status error;
|
||||
if (platform_name && platform_name[0])
|
||||
m_opaque_sp = Platform::Create(ConstString(platform_name), error);
|
||||
m_opaque_sp = Platform::Create(platform_name);
|
||||
}
|
||||
|
||||
SBPlatform::SBPlatform(const SBPlatform &rhs) {
|
||||
|
||||
Reference in New Issue
Block a user