[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.
Changes include:
- 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.
https://reviews.llvm.org/D47021
Files:
include/lldb/Target/PathMappingList.h
lldb.xcodeproj/project.pbxproj
source/Target/PathMappingList.cpp
source/Target/Target.cpp
unittests/Utility/CMakeLists.txt
unittests/Utility/PathMappingListTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47021.147347.patch
Type: text/x-patch
Size: 15573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180517/97e8ac20/attachment-0001.bin>
More information about the lldb-commits
mailing list