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
12#include "lldb/Host/posix/HostInfoPosix.h"
13#include "lldb/Utility/FileSpec.h"
14#include "llvm/ADT/StringRef.h"
15#include "llvm/Support/VersionTuple.h"
16
17#include <optional>
18#include <string>
19
20namespace lldb_private {
21
22class HostInfoLinux : public HostInfoPosix {
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();
32 static FileSpec GetProgramFileSpec();
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
44

source code of lldb/include/lldb/Host/linux/HostInfoLinux.h