This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Fix SBFileSpec.fullpath
ClosedPublic

Authored by kastiglione on Nov 18 2022, 7:47 PM.

Details

Summary

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 in finally calls GetPath.

Diff Detail

Event Timeline

kastiglione created this revision.Nov 18 2022, 7:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2022, 7:47 PM
kastiglione requested review of this revision.Nov 18 2022, 7:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2022, 7:47 PM

Fix commit wording

kastiglione edited the summary of this revision. (Show Details)Nov 18 2022, 7:56 PM
labath accepted this revision.Nov 21 2022, 3:03 AM

cool

This revision is now accepted and ready to land.Nov 21 2022, 3:03 AM
This revision was automatically updated to reflect the committed changes.