[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 10 09:08:11 PDT 2019


aprantl marked 5 inline comments as done.
aprantl added inline comments.


================
Comment at: lldb/source/Expression/DWARFExpression.cpp:2571
+      if (stack.size() < 1) {
+        if (error_ptr)
+          error_ptr->SetErrorString(
----------------
vsk wrote:
> JDevlieghere wrote:
> > aprantl wrote:
> > > JDevlieghere wrote:
> > > > Can we wrap this in a lambda? 
> > > Which part specifically do you mean?
> > ```auto SetErrorString = [&](llvm::StringRef msg) { if (error_ptr) error_ptr->SetErrorString(msg); })```
> > 
> > We could deduplicate even more code by using a macro that also covers the check around it and does the return, but I'm not sure if that's really worth it. 
> Oh, like LLDB_LOG? Seems like a nice idea. I think I need this for D67376, so I might do it if no one else has started already. It'd be great to use that here.
I'll leave this as an NFC refactoring for later since it will affect code outside of this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67369





More information about the lldb-commits mailing list