[Lldb-commits] [PATCH] D68434: SBFile support in SBCommandReturnObject

Lawrence D'Anna via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 7 16:35:14 PDT 2019


lawrence_danna marked an inline comment as done.
lawrence_danna added inline comments.


================
Comment at: lldb/include/lldb/Utility/ReproducerInstrumentation.h:257-259
+template <> struct serializer_tag<lldb::SBFile> {
+  typedef NotImplementedTag type;
+};
----------------
labath wrote:
> This still doesn't seem right to me. Though you have removed the direct `#include`, you only managed to do that since you've forward-declared the class manually -- which I'd consider "cheating". If this is indeed the right solution (which I am not convinced of yet), then this specialization should be somewhere in the API folder (SBFile.cpp, most likely)
I figured out how to do it without referring to SBFile at all.  What we really want is `std::is_trivially_copyable`


> Objects of trivially-copyable types are the only C++ objects that may be safely copied with std::memcpy or serialized to/from binary files with std::ofstream::write()/std::ifstream::read().
> 

That's exactly what we're doing here.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68434





More information about the lldb-commits mailing list