Skip to content

Commit 2324797

Browse files
Merge pull request #7363 from adrian-prantl/refactor-remove-ast4
Remove SwiftASTContext from UserExpression.cpp (NFC)
2 parents 9f973f4 + ef0f362 commit 2324797

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

lldb/source/Expression/UserExpression.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@
4242
#include "lldb/Utility/State.h"
4343
#include "lldb/Utility/StreamString.h"
4444

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-
5045
using namespace lldb_private;
5146

5247
char UserExpression::ID;
@@ -439,18 +434,9 @@ UserExpression::Execute(DiagnosticManager &diagnostic_manager,
439434
lldb::ExpressionResults expr_result = DoExecute(
440435
diagnostic_manager, exe_ctx, options, shared_ptr_to_me, result_var);
441436
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)
451438
if (auto *persistent_state =
452439
target->GetPersistentExpressionStateForLanguage(m_language))
453440
persistent_state->RemovePersistentVariable(result_var);
454-
}
455441
return expr_result;
456442
}

0 commit comments

Comments
 (0)