summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-02-08 16:31:01 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-02-08 16:31:01 +0000
commitfba754a946cda80c2ab850d4128bfa522e1bfa99 (patch)
tree2fe9ec4dd48a2d97b22cb765f10a9b13d6dc8ea0 /llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
parent2833383cd4d8a2b653f4888d576c9cf2d8ae33ec (diff)
downloadbcm5719-llvm-fba754a946cda80c2ab850d4128bfa522e1bfa99.tar.gz
bcm5719-llvm-fba754a946cda80c2ab850d4128bfa522e1bfa99.zip
[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
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
-rw-r--r--llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
index 21493774dc9..f2a837d4cf2 100644
--- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
@@ -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") {
OpenPOWER on IntegriCloud