[llvm] [memprof] Move YAML traits to MemProf.h (NFC) (PR #118668)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 09:23:45 PST 2024
================
@@ -1145,6 +1146,95 @@ template <typename FrameIdTy> class CallStackRadixTreeBuilder {
}
};
} // namespace memprof
+
+namespace yaml {
+template <> struct MappingTraits<memprof::Frame> {
+ static void mapping(IO &Io, memprof::Frame &F) {
+ Io.mapRequired("Function", F.Function);
+ Io.mapRequired("LineOffset", F.LineOffset);
+ Io.mapRequired("Column", F.Column);
+ Io.mapRequired("Inline", F.IsInlineFrame);
----------------
snehasish wrote:
Just noticed that the name of the field here is not consistent with the struct member name. Would it be better to make it consistent? (as a separate change if you think so)
https://github.com/llvm/llvm-project/pull/118668
More information about the llvm-commits
mailing list