void ClangPersistentVariables::RemovePersistentVariable( lldb::ExpressionVariableSP variable) { RemoveVariable(variable); const char *name = variable->GetName().AsCString(); if (*name != '$') return; name++; if (strtoul(name, NULL, 0) == m_next_persistent_variable_id - 1) m_next_persistent_variable_id--; }
void GoPersistentExpressionState::RemovePersistentVariable( lldb::ExpressionVariableSP variable) { RemoveVariable(variable); const char *name = variable->GetName().AsCString(); if (*(name++) != '$') return; if (*(name++) != 'g') return; if (*(name++) != 'o') return; if (strtoul(name, nullptr, 0) == m_next_persistent_variable_id - 1) m_next_persistent_variable_id--; }
void ClangPersistentVariables::RemovePersistentVariable (lldb::ExpressionVariableSP variable) { if (!variable) return; RemoveVariable(variable); const char *name = variable->GetName().AsCString(); if (*name != '$') return; name++; bool is_error = false; if (llvm::isa<SwiftASTContext>(variable->GetCompilerType().GetTypeSystem())) { switch (*name) { case 'R': break; case 'E': is_error = true; break; default: return; } name++; } uint32_t value = strtoul(name, NULL, 0); if (is_error) { if (value == m_next_persistent_error_id - 1) m_next_persistent_error_id--; } else { if (value == m_next_persistent_variable_id - 1) m_next_persistent_variable_id--; } }
void SwiftPersistentExpressionState::RemovePersistentVariable (lldb::ExpressionVariableSP variable) { if (!variable) return; RemoveVariable(variable); const char *name = variable->GetName().AsCString(); if (*name != '$') return; name++; bool is_error = false; switch (*name) { case 'R': break; case 'E': is_error = true; break; default: return; } name++; uint32_t value = strtoul(name, NULL, 0); if (is_error) { if (value == m_next_persistent_error_id - 1) m_next_persistent_error_id--; } else { if (value == m_next_persistent_variable_id - 1) m_next_persistent_variable_id--; } }