summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/System/Unix')
-rw-r--r--llvm/lib/System/Unix/Path.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/System/Unix/Path.inc b/llvm/lib/System/Unix/Path.inc
index fe2e3c67778..aca4b936e87 100644
--- a/llvm/lib/System/Unix/Path.inc
+++ b/llvm/lib/System/Unix/Path.inc
@@ -277,7 +277,9 @@ Path Path::GetMainExecutable(const char *argv0, void *MainAddr) {
}
-std::string Path::getDirname() const { return getDirnameCharSep('/'); }
+std::string Path::getDirname() const {
+ return getDirnameCharSep(path, '/');
+}
std::string
Path::getBasename() const {
OpenPOWER on IntegriCloud