summaryrefslogtreecommitdiff
path: root/lldb/include
diff options
context:
space:
mode:
authorAlex Langford <alangford@apple.com>2023-05-02 14:48:10 -0700
committerAlex Langford <alangford@apple.com>2023-05-03 10:30:42 -0700
commitcd05ffdbb2c303cbf476a3a48b3f67094d428e37 (patch)
treed576b498f7bd61c1ec374b51f1ba1beb48aa9528 /lldb/include
parent5c34cdaad7c2fdb995e5160f502022583e55b5b2 (diff)
downloadllvm-cd05ffdbb2c303cbf476a3a48b3f67094d428e37.tar.gz
[lldb] Remove distribution_id from ArchSpec
The qHostInfo packet in the gdb-remote communication protocol specifies that distribution_id can be set, so lldb handles that. But we store that in the ArchSpec representing the "Host" platform (whatever platform the debug server is running on). This field is otherwise unused in ArchSpec, so it would be a lot easier if we stored that information at the gdb-remote communication layer. Sidenote: The distribution_id field is currently unused but I did not want to remove it in case some folks found it useful (e.g. in downstream forks). Differential Revision: https://reviews.llvm.org/D149697
Diffstat (limited to 'lldb/include')
-rw-r--r--lldb/include/lldb/Host/HostInfoBase.h8
-rw-r--r--lldb/include/lldb/Utility/ArchSpec.h17
2 files changed, 8 insertions, 17 deletions
diff --git a/lldb/include/lldb/Host/HostInfoBase.h b/lldb/include/lldb/Host/HostInfoBase.h
index 42f71d91f9bf..6c86c71e552d 100644
--- a/lldb/include/lldb/Host/HostInfoBase.h
+++ b/lldb/include/lldb/Host/HostInfoBase.h
@@ -121,6 +121,14 @@ public:
return {};
}
+ /// Returns the distribution id of the host
+ ///
+ /// This will be something like "ubuntu", "fedora", etc. on Linux.
+ ///
+ /// \return Returns either std::nullopt or a reference to a const std::string
+ /// containing the distribution id
+ static llvm::StringRef GetDistributionId() { return llvm::StringRef(); }
+
protected:
static bool ComputeSharedLibraryDirectory(FileSpec &file_spec);
static bool ComputeSupportExeDirectory(FileSpec &file_spec);
diff --git a/lldb/include/lldb/Utility/ArchSpec.h b/lldb/include/lldb/Utility/ArchSpec.h
index 2de517d765b2..a226a3a5a9b7 100644
--- a/lldb/include/lldb/Utility/ArchSpec.h
+++ b/lldb/include/lldb/Utility/ArchSpec.h
@@ -10,7 +10,6 @@
#define LLDB_UTILITY_ARCHSPEC_H
#include "lldb/Utility/CompletionRequest.h"
-#include "lldb/Utility/ConstString.h"
#include "lldb/lldb-enumerations.h"
#include "lldb/lldb-forward.h"
#include "lldb/lldb-private-enumerations.h"
@@ -342,20 +341,6 @@ public:
/// \return An LLVM arch type.
llvm::Triple::ArchType GetMachine() const;
- /// Returns the distribution id of the architecture.
- ///
- /// This will be something like "ubuntu", "fedora", etc. on Linux.
- ///
- /// \return A ConstString ref containing the distribution id,
- /// potentially empty.
- ConstString GetDistributionId() const;
-
- /// Set the distribution id of the architecture.
- ///
- /// This will be something like "ubuntu", "fedora", etc. on Linux. This
- /// should be the same value returned by HostInfo::GetDistributionId ().
- void SetDistributionId(const char *distribution_id);
-
/// Tests if this ArchSpec is valid.
///
/// \return True if the current architecture is valid, false
@@ -555,8 +540,6 @@ protected:
// these are application specific extensions like micromips, mips16 etc.
uint32_t m_flags = 0;
- ConstString m_distribution_id;
-
// Called when m_def or m_entry are changed. Fills in all remaining members
// with default values.
void CoreUpdated(bool update_triple);