DavidSpickett added a comment.

I'm not familiar with this code, but the issue as explained I think I 
understand.

It seems like you're checking for empty ranges in two places, what does each 
one do?

Is there anything else these ranges indicate or do we think it is simply a 
missed optimisation in the debug info producer? If they do sometimes mean 
something, then perhaps improving the searching of the ranges is preferable to 
discarding the empty ones.
(though if all tests pass with this patch then these empty ranges can't be that 
important to us can they)



================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:1318
+          if (range_base >= subprogram_low_pc) {
+            if (range.IsValid())
+              block->AddRange(Block::Range(range_base - subprogram_low_pc,
----------------
Combine this into one if. Also I'd put the Valid check first, just seems like 
the right order for it (not that it matters really).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147606

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

Reply via email to