Add YAML traits for ConstString and FileSpec so they can be serialized as part of ProcessInfo.
Details
Diff Detail
- Repository
- rLLDB LLDB
Event Timeline
Looks fine, we just need to avoid ODR violations
lldb/include/lldb/Utility/FileSpec.h | ||
---|---|---|
444 | FileSpec::Style is a typedef for llvm::sys::path::Style. Typedefs are not separate types so this code is defining a specialization for a type it does not own. I think the simplest solution for that is to define a LLVM_YAML_STRONG_TYPEDEF(FileSpec::Style, MyStyle) MyStyle style = f.m_style; io.mapRequired("style", style); f.m_style = style in MappingTraits<FileSpec> |
lldb/include/lldb/Utility/FileSpec.h | ||
---|---|---|
401 | BTW, you can also friend a specific template instantiation: friend struct llvm::yaml::MappingTraits<FileSpec>. |
BTW, you can also friend a specific template instantiation: friend struct llvm::yaml::MappingTraits<FileSpec>.