11
11
12
12
#include " Plugins/ExpressionParser/Swift/SwiftASTManipulator.h"
13
13
#include " Plugins/TypeSystem/Swift/SwiftASTContext.h"
14
+ #include " lldb/API/SBLanguages.h"
14
15
#include " lldb/Target/Language.h"
15
16
#include " lldb/Target/Platform.h"
16
17
#include " lldb/Target/Target.h"
@@ -554,8 +555,8 @@ uint32_t SwiftExpressionSourceCode::GetNumBodyLines() {
554
555
}
555
556
556
557
Status SwiftExpressionSourceCode::GetText (
557
- std::string &text, lldb::LanguageType wrapping_language,
558
- bool needs_object_ptr, bool static_method, bool is_class, bool weak_self,
558
+ std::string &text, SourceLanguage wrapping_language, bool needs_object_ptr ,
559
+ bool static_method, bool is_class, bool weak_self,
559
560
const EvaluateExpressionOptions &options,
560
561
const std::optional<SwiftLanguageRuntime::GenericSignature> &generic_sig,
561
562
ExecutionContext &exe_ctx, uint32_t &first_body_line,
@@ -570,7 +571,7 @@ Status SwiftExpressionSourceCode::GetText(
570
571
const uint32_t pound_line = options.GetPoundLineLine ();
571
572
StreamString pound_body;
572
573
if (pound_file && pound_line) {
573
- if (wrapping_language == eLanguageTypeSwift ) {
574
+ if (wrapping_language. name == eLanguageNameSwift ) {
574
575
pound_body.Printf (" #sourceLocation(file: \" %s\" , line: %u)\n %s" ,
575
576
pound_file, pound_line, body);
576
577
} else {
@@ -579,7 +580,7 @@ Status SwiftExpressionSourceCode::GetText(
579
580
body = pound_body.GetString ().data ();
580
581
}
581
582
582
- if (wrapping_language != eLanguageTypeSwift ) {
583
+ if (wrapping_language. name != eLanguageNameSwift ) {
583
584
status.SetErrorString (" language is not Swift" );
584
585
return status;
585
586
}
0 commit comments