[lldb] Fix SBFileSpec.fullpath
authorDave Lee <davelee.com@gmail.com>
Sat, 19 Nov 2022 03:27:41 +0000 (19:27 -0800)
committerDave Lee <davelee.com@gmail.com>
Mon, 21 Nov 2022 20:09:44 +0000 (12:09 -0800)
commita59ed8fa86036efe66efcaddd5cd3e1d17856563
treee5b80eda09b22adabb36f465bd3cbf7be5ac80fc
parentbe4a1dfbf93dcb837e06bb619b934ed8cf9fd224
[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
lldb/bindings/interface/SBFileSpec.i