[Lldb-commits] [PATCH] D47021: Fix PathMappingList for relative and empty paths after recent FileSpec normalization changes
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu May 17 10:33:19 PDT 2018
clayborg created this revision.
clayborg added reviewers: labath, zturner, davide.
Herald added subscribers: JDevlieghere, aprantl, mgorny.
PathMappingList was broken for relative and empty paths after normalization changes in FileSpec. There were also no tests for PathMappingList so I added those.
- Change PathMappingList::ReverseRemapPath() to take FileSpec objects instead of ConstString. The only client of this was doing work to convert to and from ConstString objects for no reason.
- Normalize all paths prefix and replacements that are added to the PathMappingList vector so they match the paths that have been already normalized in the debug info
- Unify code in the two forms of PathMappingList::RemapPath() so only one contains the actual functionality. Prior to this, there were two versions of this code.
- Use FileSpec::AppendPathComponent() and remove a long standing TODO so paths are correctly appended to each other.
- Correctly handle the case where someone maps "" to something else. This allows all paths to be prefixed with the replacement.
- Added tests for absolute, relative and empty paths.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 15573 bytes
Desc: not available
More information about the lldb-commits