|
42 | 42 | #include "lldb/Utility/State.h" |
43 | 43 | #include "lldb/Utility/StreamString.h" |
44 | 44 |
|
45 | | -#ifdef LLDB_ENABLE_SWIFT |
46 | | -#include "Plugins/TypeSystem/Swift/SwiftASTContext.h" |
47 | | -#include "Plugins/ExpressionParser/Swift/SwiftPersistentExpressionState.h" |
48 | | -#endif //LLDB_ENABLE_SWIFT |
49 | | - |
50 | 45 | using namespace lldb_private; |
51 | 46 |
|
52 | 47 | char UserExpression::ID; |
@@ -439,18 +434,9 @@ UserExpression::Execute(DiagnosticManager &diagnostic_manager, |
439 | 434 | lldb::ExpressionResults expr_result = DoExecute( |
440 | 435 | diagnostic_manager, exe_ctx, options, shared_ptr_to_me, result_var); |
441 | 436 | Target *target = exe_ctx.GetTargetPtr(); |
442 | | - if (options.GetSuppressPersistentResult() && result_var && target) { |
443 | | -#ifdef LLDB_ENABLE_SWIFT |
444 | | - if (m_language == lldb::eLanguageTypeSwift) { |
445 | | - if (auto *exe_scope = exe_ctx.GetBestExecutionContextScope()) |
446 | | - if (auto *persistent_state = |
447 | | - target->GetSwiftPersistentExpressionState(*exe_scope)) |
448 | | - persistent_state->RemovePersistentVariable(result_var); |
449 | | - } else |
450 | | -#endif // LLDB_ENABLE_SWIFT |
| 437 | + if (options.GetSuppressPersistentResult() && result_var && target) |
451 | 438 | if (auto *persistent_state = |
452 | 439 | target->GetPersistentExpressionStateForLanguage(m_language)) |
453 | 440 | persistent_state->RemovePersistentVariable(result_var); |
454 | | - } |
455 | 441 | return expr_result; |
456 | 442 | } |
0 commit comments