LLDB mainline
HostInfoLinux.h
Go to the documentation of this file.
1//===-- HostInfoLinux.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_linux_HostInfoLinux_h_
10#define lldb_Host_linux_HostInfoLinux_h_
11
14#include "llvm/ADT/StringRef.h"
15#include "llvm/Support/VersionTuple.h"
16
17#include <optional>
18#include <string>
19
20namespace lldb_private {
21
23 friend class HostInfoBase;
24
25public:
26 static void Initialize(SharedLibraryDirectoryHelper *helper = nullptr);
27 static void Terminate();
28
29 static llvm::VersionTuple GetOSVersion();
30 static std::optional<std::string> GetOSBuildString();
31 static llvm::StringRef GetDistributionId();
33
34protected:
35 static bool ComputeSupportExeDirectory(FileSpec &file_spec);
36 static bool ComputeSystemPluginsDirectory(FileSpec &file_spec);
37 static bool ComputeUserPluginsDirectory(FileSpec &file_spec);
38 static void ComputeHostArchitectureSupport(ArchSpec &arch_32,
39 ArchSpec &arch_64);
40};
41}
42
43#endif
An architecture specification class.
Definition: ArchSpec.h:32
A file utility class.
Definition: FileSpec.h:56
void(FileSpec &this_file) SharedLibraryDirectoryHelper
A helper function for determining the liblldb location.
Definition: HostInfoBase.h:45
static FileSpec GetProgramFileSpec()
static void ComputeHostArchitectureSupport(ArchSpec &arch_32, ArchSpec &arch_64)
static void Initialize(SharedLibraryDirectoryHelper *helper=nullptr)
static bool ComputeSupportExeDirectory(FileSpec &file_spec)
static std::optional< std::string > GetOSBuildString()
static bool ComputeSystemPluginsDirectory(FileSpec &file_spec)
static llvm::VersionTuple GetOSVersion()
static bool ComputeUserPluginsDirectory(FileSpec &file_spec)
static llvm::StringRef GetDistributionId()
A class that represents a running process on the host machine.