aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Host/common/FileSystem.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-03-13 15:54:18 +0000
committerAdrian Prantl <aprantl@apple.com>2019-03-13 15:54:18 +0000
commit81d03f3a8fe5044375a53d121eefdc742a7fc9da (patch)
tree1cd6391b6ce1d444d7e544646f94d4c390aa3944 /lldb/source/Host/common/FileSystem.cpp
parent506552351c0f5608c94874bb646a0d964dc2ccbb (diff)
downloadllvm-81d03f3a8fe5044375a53d121eefdc742a7fc9da.zip
llvm-81d03f3a8fe5044375a53d121eefdc742a7fc9da.tar.gz
llvm-81d03f3a8fe5044375a53d121eefdc742a7fc9da.tar.bz2
Make sure FileSystem::Resolve preserves the path/file distinction.
This should finally fix TestPaths.py. llvm-svn: 356057
Diffstat (limited to 'lldb/source/Host/common/FileSystem.cpp')
-rw-r--r--lldb/source/Host/common/FileSystem.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Host/common/FileSystem.cpp b/lldb/source/Host/common/FileSystem.cpp
index 7ce8634..0c88405 100644
--- a/lldb/source/Host/common/FileSystem.cpp
+++ b/lldb/source/Host/common/FileSystem.cpp
@@ -264,7 +264,10 @@ void FileSystem::Resolve(FileSpec &file_spec) {
Resolve(path);
// Update the FileSpec with the resolved path.
- file_spec.SetPath(path);
+ if (file_spec.GetFilename().IsEmpty())
+ file_spec.GetDirectory().SetString(path);
+ else
+ file_spec.SetPath(path);
file_spec.SetIsResolved(true);
}