[Lldb-commits] [PATCH] D76004: [lldb] Add YAML traits for ArchSpec and ProcessInstanceInfo

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 12 03:46:56 PDT 2020


labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

Looks good. The mapping vs sequence traits thingy is not that important, but since we do have the "dump" command, it may be worthwhile to spent a bit of time implementing a slightly more complicated traits class so that the yaml output looks nicer. (Another reason against wrapping standard containters in custom XXXList classes)



================
Comment at: lldb/source/Utility/ProcessInfo.cpp:348-351
+void llvm::yaml::MappingTraits<ProcessInstanceInfoList>::mapping(
+    IO &io, ProcessInstanceInfoList &List) {
+  io.mapRequired("processes", List.m_infos);
+}
----------------
Maybe define this as a `SequenceTraits<ProcessInstanceInfoList>`? I believe you could implement the required functions by simply forwarding them to `SequenceTraits<std::vector<ProcessInstanceInfo>>::whatever`


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76004/new/

https://reviews.llvm.org/D76004





More information about the lldb-commits mailing list