Skip to content

Commit 5871d27

Browse files
committed
[lldb] Use TaskPriority as type of Task.enqueuePriority member (#10207)
Changes the type of `enqueuePriority` to `TaskPriority`. This allows Tasks to be displayed using human readable names added in #10205 (`TaskPriority` summary provider). (cherry-picked from commit 1c65036)
1 parent 1005fed commit 5871d27

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lldb/source/Plugins/Language/Swift/SwiftFormatters.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,9 @@ class TaskSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
810810
// TypeMangling for "Swift.UInt64"
811811
CompilerType uint64_type =
812812
m_ts->GetTypeFromMangledTypename(ConstString("$ss6UInt64VD"));
813+
// TypeMangling for "Swift.TaskPriority"
814+
CompilerType priority_type =
815+
m_ts->GetTypeFromMangledTypename(ConstString("$sScPD"));
813816

814817
#define RETURN_CHILD(FIELD, NAME, TYPE) \
815818
if (!FIELD) { \
@@ -842,7 +845,7 @@ class TaskSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
842845
case 2:
843846
RETURN_CHILD(m_kind_sp, kind, uint32_type);
844847
case 3:
845-
RETURN_CHILD(m_enqueue_priority_sp, enqueuePriority, uint32_type);
848+
RETURN_CHILD(m_enqueue_priority_sp, enqueuePriority, priority_type);
846849
case 4:
847850
RETURN_CHILD(m_is_child_task_sp, isChildTask, bool_type);
848851
case 5:

lldb/test/API/lang/swift/async/formatters/task/TestSwiftTaskSyntheticProvider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def test_top_level_task(self):
2222
"address = 0x",
2323
"id = 2",
2424
"kind = 0",
25-
"enqueuePriority = 21",
25+
"enqueuePriority = .medium",
2626
"isChildTask = false",
2727
"isFuture = true",
2828
"isGroupChildTask = false",

0 commit comments

Comments
 (0)