[Lldb-commits] [lldb] [llvm] [lldb] Add target groups for related targets (PR #229180)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 14 13:01:08 PDT 2026
================
@@ -489,6 +492,77 @@ class CommandObjectTargetList : public CommandObjectParsed {
}
};
+#pragma mark CommandObjectTargetGroups
+
+static llvm::StringRef GetTargetGroupRoleName(TargetGroup::Role role) {
+ switch (role) {
+ case TargetGroup::Role::CPU:
+ return "CPU";
+ case TargetGroup::Role::Accelerator:
+ return "accelerator";
+ }
+ llvm_unreachable("unhandled target group role");
+}
+
+class CommandObjectTargetGroupsList : public CommandObjectParsed {
----------------
jimingham wrote:
You list the groups with ID's so it would make sense to take the ID's as a filter:
```
(lldb) target group list
Group #0 -
...
Group #1 -
...
(lldb) target group list 1
Group #1 -
...
```
Might also be really handy to have:
(lldb) target group list --target <TargetID>
to do "list all the target groups containing the target with <TargetID>
As soon as this command gets slightly complicated, you're probably going to get tired of adding tests to TargetGroupTest.cpp, and want to add an API test instead. But the timing of that is up to you...
https://github.com/llvm/llvm-project/pull/229180
More information about the lldb-commits
mailing list