aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Host/common/FileSpec.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-01-16 12:15:42 +0000
committerPavel Labath <labath@google.com>2017-01-16 12:15:42 +0000
commit238169db60fe37a801a9bdb9174c2a0085286036 (patch)
tree6f5cbe220d01c40f2307a68e4ca1e582f6b66b11 /lldb/source/Host/common/FileSpec.cpp
parent2ef3887d28132707a81f4b087285b653963b15cd (diff)
downloadllvm-238169db60fe37a801a9bdb9174c2a0085286036.zip
llvm-238169db60fe37a801a9bdb9174c2a0085286036.tar.gz
llvm-238169db60fe37a801a9bdb9174c2a0085286036.tar.bz2
Fix windows unit tests
The unit test I added in the previous commit discovered a bug in PrependPathComponent on windows -- it was calling SetFile with the host native path syntax, whereas it should be explicitly specifying the path syntax (as AppendPathComponent does). This fixes it. llvm-svn: 292106
Diffstat (limited to 'lldb/source/Host/common/FileSpec.cpp')
-rw-r--r--lldb/source/Host/common/FileSpec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp
index 578ca9f..26503d2 100644
--- a/lldb/source/Host/common/FileSpec.cpp
+++ b/lldb/source/Host/common/FileSpec.cpp
@@ -1277,7 +1277,7 @@ void FileSpec::PrependPathComponent(llvm::StringRef component) {
std::string result =
join_path_components(m_syntax, {component, m_directory.GetStringRef(),
m_filename.GetStringRef()});
- SetFile(result, resolve);
+ SetFile(result, resolve, m_syntax);
}
void FileSpec::PrependPathComponent(const FileSpec &new_path) {