summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBHostOS.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2018-06-04 17:41:00 +0000
committerZachary Turner <zturner@google.com>2018-06-04 17:41:00 +0000
commitbdf089246e9f77babf811fd5811b7947d7cab6ac (patch)
tree2360b62c5aa9bf9b066db9fdc88134d05a4c862b /lldb/source/API/SBHostOS.cpp
parentd0f9a87215e0a25c640229d04dcd4b806b1c2433 (diff)
downloadbcm5719-llvm-bdf089246e9f77babf811fd5811b7947d7cab6ac.tar.gz
bcm5719-llvm-bdf089246e9f77babf811fd5811b7947d7cab6ac.zip
Remove dependency from Host to clang.
Host depended on clang because HostInfo had a function to get the directory where clang was installed. We move this over to the clang expression parser plugin where it's more at home. Differential Revision: https://reviews.llvm.org/D47384 llvm-svn: 333933
Diffstat (limited to 'lldb/source/API/SBHostOS.cpp')
-rw-r--r--lldb/source/API/SBHostOS.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/API/SBHostOS.cpp b/lldb/source/API/SBHostOS.cpp
index 90b75a6ecd7..8f47eab5be6 100644
--- a/lldb/source/API/SBHostOS.cpp
+++ b/lldb/source/API/SBHostOS.cpp
@@ -17,6 +17,8 @@
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/Log.h"
+#include "Plugins/ExpressionParser/Clang/ClangHost.h"
+
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/Path.h"
@@ -41,7 +43,12 @@ SBFileSpec SBHostOS::GetLLDBPythonPath() {
SBFileSpec SBHostOS::GetLLDBPath(lldb::PathType path_type) {
SBFileSpec sb_fspec;
FileSpec fspec;
- if (HostInfo::GetLLDBPath(path_type, fspec))
+ bool Success = true;
+ if (path_type == ePathTypeClangDir)
+ fspec = GetClangResourceDir();
+ else
+ Success = HostInfo::GetLLDBPath(path_type, fspec);
+ if (Success)
sb_fspec.SetFileSpec(fspec);
return sb_fspec;
}
OpenPOWER on IntegriCloud