Files
clang-p2996/lldb/source/Utility
Jonas Devlieghere df8e291ef9 [FileSpec] Re-implmenet removeLastPathComponent
When reading DBGSourcePathRemapping from a dSYM, we remove the last two
path components to make the source lookup more general. However, when
dealing with a relative path that has less than 2 components, we ended
up with an invalid (empty) FileSpec.

This patch changes the behavior of removeLastPathComponent to remove the
last path component, if possible. It does this by checking whether a
parent path exists, and if so using that as the new path. We rely
entirely on LLVM's path implementation to do the heavy lifting.

We now also return a boolean which indicates whether the operator was
successful or not.

Differential revision: https://reviews.llvm.org/D47495

rdar://37791687

llvm-svn: 333540
2018-05-30 13:03:16 +00:00
..
2018-04-30 16:49:04 +00:00
2017-04-06 18:12:24 +00:00
2018-04-30 16:49:04 +00:00
2018-04-30 16:49:04 +00:00
2018-04-30 16:49:04 +00:00
2017-04-06 18:12:24 +00:00
2018-04-30 16:49:04 +00:00
2017-04-06 18:12:24 +00:00
2018-04-30 16:49:04 +00:00
2018-05-29 09:10:46 +00:00
2018-04-30 16:49:04 +00:00
2017-04-06 18:12:24 +00:00
2017-04-06 18:12:24 +00:00
2017-04-06 18:12:24 +00:00
2017-04-06 18:12:24 +00:00
2018-04-30 16:49:04 +00:00
2018-04-30 16:49:04 +00:00