From 60f028ff035a787078d3a336f981e539bee8f2e3 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 19 Jun 2018 15:09:07 +0000 Subject: Replace HostInfo::GetLLDBPath with specific functions Summary: Instead of a function taking an enum value determining which path to return, we now have a suite of functions, each returning a single path kind. This makes it easy to move the python-path function into a specific plugin in a follow-up commit. All the users of GetLLDBPath were converted to call specific functions instead. Most of them were hard-coding the enum value anyway, so this conversion was simple. The only exception was SBHostOS, which I've changed to use a switch on the incoming enum value. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D48272 llvm-svn: 335052 --- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp') diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp index 10da80f4500..b581d03fce0 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -1132,11 +1132,11 @@ const char *PlatformDarwin::GetDeveloperDirectory() { if (m_developer_directory.empty()) { bool developer_dir_path_valid = false; char developer_dir_path[PATH_MAX]; - FileSpec temp_file_spec; // Get the lldb framework's file path, and if it exists, truncate some // components to only the developer directory path. - if (HostInfo::GetLLDBPath(ePathTypeLLDBShlibDir, temp_file_spec)) { + FileSpec temp_file_spec = HostInfo::GetShlibDir(); + if (temp_file_spec) { if (temp_file_spec.GetPath(developer_dir_path, sizeof(developer_dir_path))) { // e.g. -- cgit v1.2.3