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

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon May 15 13:02:22 PDT 2023


bulbazord added a comment.

Ok, after looking at this more closely, it's a little clearer to me why `SBFileSpec::GetDirectory` was written this way to begin with. The method itself requires its return value to be denormalized (something not explicitly documented in the header nor the SWIG docstrings for this class/method). The only way to get the FileSpec's path in a denormalized form is by using `FileSpec::GetPath` and its variants... That's why we create a new FileSpec, remove its filename, and then get the path as a ConstString. I won't be addressing that in this patch because I view this as a flaw of the existing FileSpec implementation.

Thank you for finding and reverting this.


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