[Lldb-commits] [PATCH] D149625: [lldb] Refactor SBFileSpec::GetDirectory

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 2 10:26:41 PDT 2023


bulbazord added a comment.

In D149625#4312838 <https://reviews.llvm.org/D149625#4312838>, @jingham wrote:

> The old code had the side-effect of NOT resolving the path of the SBFileSpec in order to get its directory.  I am not sure whether that was on purpose or not, however.

To be more precise, the old code had the side-effect of guaranteeing that whatever path was given to you was from an unresolved FileSpec. Right now, if the SBFileSpec is unresolved, this will do the exact same thing as before. With this change, if an SBFileSpec is resolved, the path you're getting is from a resolved FileSpec. I'm pretty sure that this shouldn't actually be different than what was there before since we're making a copy from the underlying FileSpec though, unless I'm missing something?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149625



More information about the lldb-commits mailing list