jj10306 added inline comments.

================
Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.h:152
+  ///   The errors of the trace.
+  std::unordered_map<uint64_t, llvm::Error> GetErrors() const;
+
----------------
Return a reference here to avoid potential expensive copy when returning.

Something else to consider is if we need/want an API exposing all the entire 
error map or if something like:
`llvm::Error GetErrorByInstructionIndex(uint64_t insn_index) const` that allows 
the caller to specify the key into the map would make more sense? 
This also has the advantage that it hides the implementation detail of what 
data type is being used under the hood to represent the error map!
@wallace @zrthxn wdyt?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122293

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to