================ @@ -104,6 +105,23 @@ struct llvm::TimeTraceProfilerEntry { } }; +struct InProgressEntry { + std::unique_ptr<TimeTraceProfilerEntry> Event; + std::vector<TimeTraceProfilerEntry> InstantEvents; + + InProgressEntry(TimePointType &&S, TimePointType &&E, std::string &&N, ---------------- ilya-biryukov wrote:
Suggestion: removing these constructors and simply creating the `InProgressEntry` by hand would result in less code and less boilerplate (even though the usage will span more lines): ``` InProgressEntry E; E.Event = make_unique<...> ``` Given that we only have two places where it's used, I think we're going to make things simpler. (When LLVM switches to C++20 it would also be possible to use designated initializer syntax and actually get very readable code on a single line too, but that's a long time in the future). However, this file already uses constructors, so this approach would be a little inconsistent. Feel free to agree or ignore, just a suggestion. https://github.com/llvm/llvm-project/pull/103039 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits