LLDB mainline
HostInfoMacOSX.h
Go to the documentation of this file.
1//===-- HostInfoMacOSX.h ----------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_HOST_MACOSX_HOSTINFOMACOSX_H
10#define LLDB_HOST_MACOSX_HOSTINFOMACOSX_H
11
15#include "llvm/ADT/StringRef.h"
16#include "llvm/Support/VersionTuple.h"
17#include <optional>
18
19namespace lldb_private {
20
21class ArchSpec;
22
24 friend class HostInfoBase;
25
26public:
27 static llvm::VersionTuple GetOSVersion();
28 static llvm::VersionTuple GetMacCatalystVersion();
29 static std::optional<std::string> GetOSBuildString();
33
34 /// Query xcrun to find an Xcode SDK directory.
35 static llvm::Expected<llvm::StringRef> GetSDKRoot(SDKOptions options);
36 static llvm::Expected<llvm::StringRef> FindSDKTool(XcodeSDK sdk,
37 llvm::StringRef tool);
38
39 /// Shared cache utilities
41 GetSharedCacheImageInfo(llvm::StringRef image_name);
42
43protected:
44 static bool ComputeSupportExeDirectory(FileSpec &file_spec);
45 static void ComputeHostArchitectureSupport(ArchSpec &arch_32,
46 ArchSpec &arch_64);
47 static bool ComputeHeaderDirectory(FileSpec &file_spec);
48 static bool ComputeSystemPluginsDirectory(FileSpec &file_spec);
49 static bool ComputeUserPluginsDirectory(FileSpec &file_spec);
50};
51}
52
53#endif
An architecture specification class.
Definition: ArchSpec.h:31
A file utility class.
Definition: FileSpec.h:56
static llvm::Expected< llvm::StringRef > GetSDKRoot(SDKOptions options)
Query xcrun to find an Xcode SDK directory.
static FileSpec GetProgramFileSpec()
static std::optional< std::string > GetOSBuildString()
static FileSpec GetXcodeContentsDirectory()
static bool ComputeSupportExeDirectory(FileSpec &file_spec)
static SharedCacheImageInfo GetSharedCacheImageInfo(llvm::StringRef image_name)
Shared cache utilities.
static void ComputeHostArchitectureSupport(ArchSpec &arch_32, ArchSpec &arch_64)
static bool ComputeUserPluginsDirectory(FileSpec &file_spec)
static llvm::VersionTuple GetMacCatalystVersion()
static bool ComputeSystemPluginsDirectory(FileSpec &file_spec)
static bool ComputeHeaderDirectory(FileSpec &file_spec)
static FileSpec GetXcodeDeveloperDirectory()
static llvm::VersionTuple GetOSVersion()
static llvm::Expected< llvm::StringRef > FindSDKTool(XcodeSDK sdk, llvm::StringRef tool)
An abstraction for Xcode-style SDKs that works like ArchSpec.
Definition: XcodeSDK.h:24
A class that represents a running process on the host machine.