[Lldb-commits] [PATCH] D100965: [lldb] Refactor argument group by SourceLocationSpec (NFCI)

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 26 18:14:16 PDT 2021


mib added a comment.

In D100965#2716239 <https://reviews.llvm.org/D100965#2716239>, @teemperor wrote:

> I am wondering how SourceLocationSpec is related to lldb's Declaration class (which is FileSpec + line + column and describes a location in source code)? It seems like the current SourceLocationSpec is just a Declaration with the two additional search variables (and the first iteration was exactly the same as Declaration).
> Could we maybe turn SourceLocationSpec to store a lldb::Declaration instead of file/line/column? I'm aware that the Declaration class first needs some cleanup (and a removal of that #ifdef around column....), but right now we are already using Declarations in a bunch of places to describe source locations.

I don't think adding a level of indirection would serve much purpose and I don't like the fact `Declaration` is an exposed class (being part of the `lldb` namespace), and that it uses a macro-based system for invalid values. Also `SourceLocationSpec` instances are immutable and also be valid. May be I could try to replace all occurrences of `Declaration` by `SourceLocationSpec` in a follow-up patch ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100965



More information about the lldb-commits mailing list