diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-06-13 22:08:14 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-06-13 22:08:14 +0000 |
commit | 937348cd1359b30359b958ca81b7e7d8711b443e (patch) | |
tree | f4249e96df7ff194b336fdbf8cbd6c690d5a39f2 /lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp | |
parent | 07570f55e4ad104a474efff4ae1a3c3b49145fed (diff) | |
download | bcm5719-llvm-937348cd1359b30359b958ca81b7e7d8711b443e.tar.gz bcm5719-llvm-937348cd1359b30359b958ca81b7e7d8711b443e.zip |
[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
Diffstat (limited to 'lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp')
-rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp index 50b5988b48a..c24a0ee2a82 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp @@ -217,13 +217,13 @@ ConstString PlatformMacOSX::GetSDKDirectory(lldb_private::Target &target) { "SDKs/MacOSX%u.%u.sdk", xcode_contents_path.c_str(), versions[0], versions[1]); - fspec.SetFile(sdk_path.GetString(), false); + fspec.SetFile(sdk_path.GetString(), false, FileSpec::Style::native); if (fspec.Exists()) return ConstString(sdk_path.GetString()); } if (!default_xcode_sdk.empty()) { - fspec.SetFile(default_xcode_sdk, false); + fspec.SetFile(default_xcode_sdk, false, FileSpec::Style::native); if (fspec.Exists()) return ConstString(default_xcode_sdk); } |