blob: b1c7f9c805bfc10fa782d56b110095500456fb03 [file] [log] [blame]
Andrew Walbran3d2c1972020-04-07 12:24:26 +01001//===-- 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 <string>
18
19namespace lldb_private {
20
21class HostInfoLinux : public HostInfoPosix {
22 friend class HostInfoBase;
23
24private:
25 // Static class, unconstructable.
26 HostInfoLinux();
27 ~HostInfoLinux();
28
29public:
30 static void Initialize();
31
32 static llvm::VersionTuple GetOSVersion();
33 static bool GetOSBuildString(std::string &s);
34 static bool GetOSKernelDescription(std::string &s);
35 static llvm::StringRef GetDistributionId();
36 static FileSpec GetProgramFileSpec();
37
38protected:
39 static bool ComputeSupportExeDirectory(FileSpec &file_spec);
40 static bool ComputeSystemPluginsDirectory(FileSpec &file_spec);
41 static bool ComputeUserPluginsDirectory(FileSpec &file_spec);
42 static void ComputeHostArchitectureSupport(ArchSpec &arch_32,
43 ArchSpec &arch_64);
44};
45}
46
47#endif