summaryrefslogtreecommitdiff
path: root/source/Host/macosx/objcxx/HostInfoMacOSX.mm
diff options
context:
space:
mode:
Diffstat (limited to 'source/Host/macosx/objcxx/HostInfoMacOSX.mm')
-rw-r--r--source/Host/macosx/objcxx/HostInfoMacOSX.mm20
1 files changed, 12 insertions, 8 deletions
diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
index a39d26aa31ae..165e87e8bed4 100644
--- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
@@ -7,11 +7,11 @@
//
//===----------------------------------------------------------------------===//
-#include "lldb/Host/HostInfo.h"
#include "lldb/Host/macosx/HostInfoMacOSX.h"
+#include "lldb/Host/FileSystem.h"
+#include "lldb/Host/HostInfo.h"
#include "lldb/Utility/Args.h"
#include "lldb/Utility/Log.h"
-#include "lldb/Utility/SafeMachO.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/FileSystem.h"
@@ -97,14 +97,13 @@ FileSpec HostInfoMacOSX::GetProgramFileSpec() {
uint32_t len = sizeof(program_fullpath);
int err = _NSGetExecutablePath(program_fullpath, &len);
if (err == 0)
- g_program_filespec.SetFile(program_fullpath, false,
- FileSpec::Style::native);
+ g_program_filespec.SetFile(program_fullpath, FileSpec::Style::native);
else if (err == -1) {
char *large_program_fullpath = (char *)::malloc(len + 1);
err = _NSGetExecutablePath(large_program_fullpath, &len);
if (err == 0)
- g_program_filespec.SetFile(large_program_fullpath, false,
+ g_program_filespec.SetFile(large_program_fullpath,
FileSpec::Style::native);
::free(large_program_fullpath);
@@ -140,8 +139,9 @@ bool HostInfoMacOSX::ComputeSupportExeDirectory(FileSpec &file_spec) {
// as in the case of a python script, the executable is python, not
// the lldb driver.
raw_path.append("/../bin");
- FileSpec support_dir_spec(raw_path, true);
- if (!llvm::sys::fs::is_directory(support_dir_spec.GetPath())) {
+ FileSpec support_dir_spec(raw_path);
+ FileSystem::Instance().Resolve(support_dir_spec);
+ if (!FileSystem::Instance().IsDirectory(support_dir_spec)) {
Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
if (log)
log->Printf("HostInfoMacOSX::%s(): failed to find support directory",
@@ -204,7 +204,8 @@ bool HostInfoMacOSX::ComputeSystemPluginsDirectory(FileSpec &file_spec) {
}
bool HostInfoMacOSX::ComputeUserPluginsDirectory(FileSpec &file_spec) {
- FileSpec temp_file("~/Library/Application Support/LLDB/PlugIns", true);
+ FileSpec temp_file("~/Library/Application Support/LLDB/PlugIns");
+ FileSystem::Instance().Resolve(temp_file);
file_spec.GetDirectory().SetCString(temp_file.GetPath().c_str());
return true;
}
@@ -254,6 +255,9 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32,
#if defined(TARGET_OS_TV) && TARGET_OS_TV == 1
arch_32.GetTriple().setOS(llvm::Triple::TvOS);
arch_64.GetTriple().setOS(llvm::Triple::TvOS);
+#elif defined(TARGET_OS_BRIDGE) && TARGET_OS_BRIDGE == 1
+ arch_32.GetTriple().setOS(llvm::Triple::BridgeOS);
+ arch_64.GetTriple().setOS(llvm::Triple::BridgeOS);
#else
arch_32.GetTriple().setOS(llvm::Triple::IOS);
arch_64.GetTriple().setOS(llvm::Triple::IOS);