diff options
| author | Pavel Labath <labath@google.com> | 2018-06-19 15:09:07 +0000 |
|---|---|---|
| committer | Pavel Labath <labath@google.com> | 2018-06-19 15:09:07 +0000 |
| commit | 60f028ff035a787078d3a336f981e539bee8f2e3 (patch) | |
| tree | 575a5337de8d5e97bec7dd61f819cb76801940a2 /lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp | |
| parent | 7bbedb80232144ee243b61709818defdc54e6609 (diff) | |
| download | bcm5719-llvm-60f028ff035a787078d3a336f981e539bee8f2e3.tar.gz bcm5719-llvm-60f028ff035a787078d3a336f981e539bee8f2e3.zip | |
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
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp')
| -rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp index c3599859732..4251d2ee75b 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp @@ -115,10 +115,9 @@ bool lldb_private::ComputeClangDirectory(FileSpec &lldb_shlib_spec, } static bool ComputeClangDirectory(FileSpec &file_spec) { - FileSpec lldb_file_spec; - if (!HostInfo::GetLLDBPath(lldb::ePathTypeLLDBShlibDir, lldb_file_spec)) - return false; - return ComputeClangDirectory(lldb_file_spec, file_spec, true); + if (FileSpec lldb_file_spec = HostInfo::GetShlibDir()) + return ComputeClangDirectory(lldb_file_spec, file_spec, true); + return false; } #else // __APPLE__ |

