[all-commits] [llvm/llvm-project] a59ed8: [lldb] Fix SBFileSpec.fullpath

Dave Lee via All-commits all-commits at lists.llvm.org
Mon Nov 21 12:10:02 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a59ed8fa86036efe66efcaddd5cd3e1d17856563
      https://github.com/llvm/llvm-project/commit/a59ed8fa86036efe66efcaddd5cd3e1d17856563
  Author: Dave Lee <davelee.com at gmail.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M lldb/bindings/interface/SBFileSpec.i

  Log Message:
  -----------
  [lldb] Fix SBFileSpec.fullpath

Reimplement `SBFileSpec.fullpath` to (indirectly) use `FileSpec::GetPath`.

Instead of hardcoding a `/` separator, use `GetPath`. This makes use of the
`FileSpec`'s internal style, which for example allows for backslash on Windows
where required.

It's not obvious from looking at the source, but the `fullpath` property is
implemented with `str`, which calls `GetDescription`, which finally calls
`GetPath`.

Differential Revision: https://reviews.llvm.org/D138348




More information about the All-commits mailing list