[Lldb-commits] [lldb] d7db094 - [lldb] Move ArchitectureCreateInstance into ldb-private-interfaces
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 18 20:21:09 PST 2020
Author: Jonas Devlieghere
Date: 2020-02-18T20:19:54-08:00
New Revision: d7db094ef790f16a6252ac83a48958de23851aee
URL: https://github.com/llvm/llvm-project/commit/d7db094ef790f16a6252ac83a48958de23851aee
DIFF: https://github.com/llvm/llvm-project/commit/d7db094ef790f16a6252ac83a48958de23851aee.diff
LOG: [lldb] Move ArchitectureCreateInstance into ldb-private-interfaces
There's no reason this should be the only one living in the
PluginManager itself.
Added:
Modified:
lldb/include/lldb/Core/PluginManager.h
lldb/include/lldb/lldb-forward.h
lldb/include/lldb/lldb-private-interfaces.h
lldb/source/Core/PluginManager.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Core/PluginManager.h b/lldb/include/lldb/Core/PluginManager.h
index 90db9cee06ac..4cae597d3732 100644
--- a/lldb/include/lldb/Core/PluginManager.h
+++ b/lldb/include/lldb/Core/PluginManager.h
@@ -62,9 +62,6 @@ class PluginManager {
static ABICreateInstance GetABICreateCallbackAtIndex(uint32_t idx);
// Architecture
- using ArchitectureCreateInstance =
- std::unique_ptr<Architecture> (*)(const ArchSpec &);
-
static void RegisterPlugin(ConstString name, llvm::StringRef description,
ArchitectureCreateInstance create_callback);
diff --git a/lldb/include/lldb/lldb-forward.h b/lldb/include/lldb/lldb-forward.h
index d1d02e571681..97fb20bd0b70 100644
--- a/lldb/include/lldb/lldb-forward.h
+++ b/lldb/include/lldb/lldb-forward.h
@@ -20,6 +20,7 @@ class ABI;
class Address;
class AddressRange;
class AddressResolver;
+class Architecture;
class ArchSpec;
class ArmUnwindInfo;
class Args;
diff --git a/lldb/include/lldb/lldb-private-interfaces.h b/lldb/include/lldb/lldb-private-interfaces.h
index 5c351fa0b813..1568e7a3cb51 100644
--- a/lldb/include/lldb/lldb-private-interfaces.h
+++ b/lldb/include/lldb/lldb-private-interfaces.h
@@ -13,14 +13,16 @@
#include "lldb/lldb-enumerations.h"
#include "lldb/lldb-forward.h"
-#include "lldb/lldb-types.h"
-
#include "lldb/lldb-private-enumerations.h"
-
+#include "lldb/lldb-types.h"
+#include <memory>
#include <set>
namespace lldb_private {
-typedef lldb::ABISP (*ABICreateInstance)(lldb::ProcessSP process_sp, const ArchSpec &arch);
+typedef lldb::ABISP (*ABICreateInstance)(lldb::ProcessSP process_sp,
+ const ArchSpec &arch);
+typedef std::unique_ptr<Architecture> (*ArchitectureCreateInstance)(
+ const ArchSpec &arch);
typedef Disassembler *(*DisassemblerCreateInstance)(const ArchSpec &arch,
const char *flavor);
typedef DynamicLoader *(*DynamicLoaderCreateInstance)(Process *process,
diff --git a/lldb/source/Core/PluginManager.cpp b/lldb/source/Core/PluginManager.cpp
index e23afecbf13f..136b1fcbcbf0 100644
--- a/lldb/source/Core/PluginManager.cpp
+++ b/lldb/source/Core/PluginManager.cpp
@@ -270,8 +270,7 @@ ABICreateInstance PluginManager::GetABICreateCallbackAtIndex(uint32_t idx) {
#pragma mark Architecture
-typedef PluginInstance<PluginManager::ArchitectureCreateInstance>
- ArchitectureInstance;
+typedef PluginInstance<ArchitectureCreateInstance> ArchitectureInstance;
typedef std::vector<ArchitectureInstance> ArchitectureInstances;
static std::mutex &GetArchitectureMutex() {
More information about the lldb-commits
mailing list