From 937348cd1359b30359b958ca81b7e7d8711b443e Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 13 Jun 2018 22:08:14 +0000 Subject: [FileSpec] Make style argument mandatory for SetFile. NFC SetFile has an optional style argument which defaulted to the native style. This patch makes that argument mandatory so clients of the FileSpec class are forced to think about the correct syntax. At the same time this introduces a (protected) convenience method to update the file from within the FileSpec class that keeps the current style. These two changes together prevent a potential pitfall where the style might be forgotten, leading to the path being updated and the style unintentionally being changed to the host style. llvm-svn: 334663 --- lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp') diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp index 9cd294455e2..26feec28232 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp @@ -320,12 +320,12 @@ Status PlatformiOSSimulator::GetSymbolFile(const FileSpec &platform_file, platform_file_path); // First try in the SDK and see if the file is in there - local_file.SetFile(resolved_path, true); + local_file.SetFile(resolved_path, true, FileSpec::Style::native); if (local_file.Exists()) return error; // Else fall back to the actual path itself - local_file.SetFile(platform_file_path, true); + local_file.SetFile(platform_file_path, true, FileSpec::Style::native); if (local_file.Exists()) return error; } -- cgit v1.2.3