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 
13 #include "lldb/Utility/FileSpec.h"
14 #include "lldb/Utility/XcodeSDK.h"
15 #include "llvm/Support/VersionTuple.h"
16 
17 namespace lldb_private {
18 
19 class ArchSpec;
20 
21 class HostInfoMacOSX : public HostInfoPosix {
22  friend class HostInfoBase;
23 
24 private:
25  // Static class, unconstructable.
26  HostInfoMacOSX() = delete;
27  ~HostInfoMacOSX() = delete;
28 
29 public:
30  static llvm::VersionTuple GetOSVersion();
31  static llvm::VersionTuple GetMacCatalystVersion();
32  static bool GetOSBuildString(std::string &s);
33  static bool GetOSKernelDescription(std::string &s);
37 
38  /// Query xcrun to find an Xcode SDK directory.
39  static llvm::StringRef GetXcodeSDKPath(XcodeSDK sdk);
40 protected:
41  static bool ComputeSupportExeDirectory(FileSpec &file_spec);
42  static void ComputeHostArchitectureSupport(ArchSpec &arch_32,
43  ArchSpec &arch_64);
44  static bool ComputeHeaderDirectory(FileSpec &file_spec);
45  static bool ComputeSystemPluginsDirectory(FileSpec &file_spec);
46  static bool ComputeUserPluginsDirectory(FileSpec &file_spec);
47 };
48 }
49 
50 #endif
A class that represents a running process on the host machine.
static FileSpec GetProgramFileSpec()
A file utility class.
Definition: FileSpec.h:56
An architecture specification class.
Definition: ArchSpec.h:33
static llvm::VersionTuple GetMacCatalystVersion()
static bool GetOSBuildString(std::string &s)
static llvm::VersionTuple GetOSVersion()
static bool GetOSKernelDescription(std::string &s)
static bool ComputeUserPluginsDirectory(FileSpec &file_spec)
static void ComputeHostArchitectureSupport(ArchSpec &arch_32, ArchSpec &arch_64)
static bool ComputeHeaderDirectory(FileSpec &file_spec)
static llvm::StringRef GetXcodeSDKPath(XcodeSDK sdk)
Query xcrun to find an Xcode SDK directory.
static bool ComputeSystemPluginsDirectory(FileSpec &file_spec)
static FileSpec GetXcodeContentsDirectory()
An abstraction for Xcode-style SDKs that works like ArchSpec.
Definition: XcodeSDK.h:24
static bool ComputeSupportExeDirectory(FileSpec &file_spec)
static FileSpec GetXcodeDeveloperDirectory()