[Lldb-commits] [lldb] [lldb] Add Checksum to FileSpec (PR #71457)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 6 16:59:47 PST 2023
medismailben wrote:
> Depends on #71456.
>
> I considered an alternative where we don't store the `Checksum` in the `FileSpec` but create a new `SupportFile` class that wraps a `Checksum` and a `FileSpec`. The reason I didn't got with this approach is because of the `FileSpecList`. The latter has helper functions that are used in the context of "support files" which would have to duplicated in a `SupportFileList` and I wasn't sure we weren't vending a `FileSpecList` through the SB API that would now become a `SupportFileList`.
>
> A checksum is 16 bytes. Please let me know if you think that the overhead of that is too much and outweighs the churn and code duplication to adopt a `SupportFile` and `SupportFileList`.
I personally like the current implementation, I think it makes sense to have the `Checksum` in the `FileSpec`, I don't see the point of making new `SupportFile{,List}` classes if it's just wrapping a `FileSpec` and its `Checksum`.
https://github.com/llvm/llvm-project/pull/71457
More information about the lldb-commits
mailing list