mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-24 06:27:56 +00:00
[dwarfdump] Normalize input path.
Before this patch, llvm-dwarfdump would reject `bundel.dSYM/` as input, while `bundel.dSYM` was accepted. The reason is that `path::extension()` returns an empty string for the former, leading to the argument not being recognized as a dSYM bundle. llvm-svn: 324621
This commit is contained in:
parent
de0e359a34
commit
bce345d61d
@ -478,6 +478,8 @@ static bool handleFile(StringRef Filename, HandlerFn HandleObj,
|
||||
static std::vector<std::string> expandBundle(const std::string &InputPath) {
|
||||
std::vector<std::string> BundlePaths;
|
||||
SmallString<256> BundlePath(InputPath);
|
||||
// Normalize input path. This is necessary to accept `bundle.dSYM/`.
|
||||
sys::path::remove_dots(BundlePath);
|
||||
// Manually open up the bundle to avoid introducing additional dependencies.
|
||||
if (sys::fs::is_directory(BundlePath) &&
|
||||
sys::path::extension(BundlePath) == ".dSYM") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user