jingham added inline comments.

================
Comment at: lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:1926
+  bool IsSymbolAlreadyPresent() {
+    if (flags == LLDB_INVALID_ADDRESS)
+      return true;
----------------
JDevlieghere wrote:
> `return flags == LLDB_INVALID_ADDRESS`
This sort of change has the downside that you can't break when flags == 
LLDB_INVALID_ADDRESS without adding a condition.  That seems in this case like 
a condition you are likely to want to break on, and given this looks like a 
function that gets called a lot, it's probably good to pay the cost of a 
condition.

I'm not sure I'm in favor of this sort of rewrite.  It just saves one line, and 
isn't particularly easier to read.  Does it have some benefit I'm missing?  


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76758



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

Reply via email to