@@ -566,7 +566,6 @@ AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp,
566
566
if (!self_type.IsValid () ||
567
567
!self_type.GetTypeSystem ()->SupportsLanguage (lldb::eLanguageTypeSwift))
568
568
return llvm::createStringError (
569
- llvm::inconvertibleErrorCode (),
570
569
" Unable to add the aliases the expression needs because "
571
570
" self isn't valid." );
572
571
@@ -577,7 +576,6 @@ AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp,
577
576
578
577
if (!imported_self_type.IsValid ())
579
578
return llvm::createStringError (
580
- llvm::inconvertibleErrorCode (),
581
579
" Unable to add the aliases the expression needs because the "
582
580
" self type from an import isn't valid." );
583
581
@@ -587,7 +585,6 @@ AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp,
587
585
*stack_frame, imported_self_type);
588
586
if (!imported_self_type)
589
587
return llvm::createStringError (
590
- llvm::inconvertibleErrorCode (),
591
588
" Unable to add the aliases the expression needs because the Swift "
592
589
" expression parser couldn't bind the type parameters for self." );
593
590
}
@@ -597,7 +594,6 @@ AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp,
597
594
imported_self_type.GetTypeSystem ().dyn_cast_or_null <TypeSystemSwift>();
598
595
if (!swift_type_system)
599
596
return llvm::createStringError (
600
- llvm::inconvertibleErrorCode (),
601
597
" Unable to add the aliases the expression needs because "
602
598
" self is not a Swift type." );
603
599
@@ -607,7 +603,6 @@ AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp,
607
603
imported_self_type.GetOpaqueQualType ());
608
604
if (!imported_self_type)
609
605
return llvm::createStringError (
610
- llvm::inconvertibleErrorCode (),
611
606
" Unable to add the aliases the expression needs because "
612
607
" the Swift expression parser couldn't get the referent "
613
608
" type for self." );
@@ -618,7 +613,6 @@ AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp,
618
613
imported_self_type.GetTypeSystem ().dyn_cast_or_null <TypeSystemSwift>();
619
614
if (!swift_type_system)
620
615
return llvm::createStringError (
621
- llvm::inconvertibleErrorCode (),
622
616
" Unable to add the aliases the expression needs because "
623
617
" self is not a Swift type." );
624
618
@@ -628,7 +622,6 @@ AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp,
628
622
imported_self_type.GetOpaqueQualType (), stack_frame_sp.get ());
629
623
if (!imported_self_type)
630
624
return llvm::createStringError (
631
- llvm::inconvertibleErrorCode (),
632
625
" Unable to add the aliases the expression needs because the Swift "
633
626
" expression parser couldn't get the instance type for self." );
634
627
}
@@ -641,13 +634,11 @@ AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp,
641
634
" Couldn't get SwiftASTContext type for self type {0}." ,
642
635
imported_self_type.GetDisplayTypeName ());
643
636
return llvm::createStringError (
644
- llvm::inconvertibleErrorCode (),
645
637
" Unable to add the aliases the expression needs because the Swift "
646
638
" expression parser couldn't get the Swift type for self." );
647
639
}
648
640
if (!swift_self_type.get ())
649
- return llvm::createStringError (llvm::inconvertibleErrorCode (),
650
- " null self type" );
641
+ return llvm::createStringError (" null self type" );
651
642
652
643
swift::Type object_type = swift_self_type.get ()->getWithoutSpecifierType ();
653
644
@@ -665,7 +656,6 @@ AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp,
665
656
666
657
if (!optional_type || optional_type->getGenericArgs ().empty ())
667
658
return llvm::createStringError (
668
- llvm::inconvertibleErrorCode (),
669
659
" Unable to add the aliases the expression needs because the Swift "
670
660
" expression parser couldn't get an optional type for self." );
671
661
@@ -675,7 +665,6 @@ AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp,
675
665
if (!llvm::isa<swift::ClassType>(first_arg_type) &&
676
666
!llvm::isa<swift::BoundGenericClassType>(first_arg_type))
677
667
return llvm::createStringError (
678
- llvm::inconvertibleErrorCode (),
679
668
" Unable to add the aliases the expression needs because "
680
669
" weakly captured type is not a class type." );
681
670
@@ -688,7 +677,6 @@ AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp,
688
677
" SEP:AddRequiredAliases: Failed to resolve the self archetype - "
689
678
" could not make the $__lldb_context typealias." );
690
679
return llvm::createStringError (
691
- llvm::inconvertibleErrorCode (),
692
680
" Unable to add the aliases the expression needs because the "
693
681
" Swift expression parser couldn't resolve the self archetype." );
694
682
}
@@ -702,10 +690,10 @@ AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp,
702
690
" SEP:AddRequiredAliases: Failed to make the $__lldb_context "
703
691
" typealias." );
704
692
return llvm::createStringError (
705
- llvm::inconvertibleErrorCode (),
706
693
" Unable to add the aliases the expression needs because the "
707
694
" Swift expression parser couldn't create a context type "
708
- " alias for lldb. " + llvm::toString (type_alias_decl.takeError ()));
695
+ " alias for lldb. " +
696
+ llvm::toString (type_alias_decl.takeError ()));
709
697
}
710
698
711
699
return llvm::Error::success ();
@@ -1135,12 +1123,10 @@ AddArchetypeTypeAliases(std::unique_ptr<SwiftASTManipulator> &code_manipulator,
1135
1123
llvm::SmallVector<swift::TypeAliasDecl *> type_aliases;
1136
1124
lldb::ProcessSP process_sp (stack_frame.CalculateProcess ());
1137
1125
if (!process_sp)
1138
- return llvm::createStringError (llvm::inconvertibleErrorCode (),
1139
- " no process" );
1126
+ return llvm::createStringError (" no process" );
1140
1127
auto *runtime = SwiftLanguageRuntime::Get (process_sp);
1141
1128
if (!runtime)
1142
- return llvm::createStringError (llvm::inconvertibleErrorCode (),
1143
- " no runtime" );
1129
+ return llvm::createStringError (" no runtime" );
1144
1130
1145
1131
auto &typeref_typesystem = swift_ast_context.GetTypeSystemSwiftTypeRef ();
1146
1132
@@ -1151,8 +1137,7 @@ AddArchetypeTypeAliases(std::unique_ptr<SwiftASTManipulator> &code_manipulator,
1151
1137
if (auto signature = SwiftLanguageRuntime::GetGenericSignature (
1152
1138
func_name.GetStringRef (), typeref_typesystem))
1153
1139
if (signature->pack_expansions .size ())
1154
- return llvm::createStringError (llvm::inconvertibleErrorCode (),
1155
- " [AddArchetypeTypeAliases] Variadic "
1140
+ return llvm::createStringError (" [AddArchetypeTypeAliases] Variadic "
1156
1141
" generic functions are not supported." );
1157
1142
1158
1143
struct MetadataPointerInfo {
0 commit comments