[llvm] 81613dd - [ORC] Move some typedefs from Core.h to a new header, CoreContainers.h. NFC.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 10 02:05:35 PST 2024
Author: Lang Hames
Date: 2024-11-10T21:05:22+11:00
New Revision: 81613ddcd6fe04a029c1a15a3454b5b0cd18a24c
URL: https://github.com/llvm/llvm-project/commit/81613ddcd6fe04a029c1a15a3454b5b0cd18a24c
DIFF: https://github.com/llvm/llvm-project/commit/81613ddcd6fe04a029c1a15a3454b5b0cd18a24c.diff
LOG: [ORC] Move some typedefs from Core.h to a new header, CoreContainers.h. NFC.
This is a first step towards breaking up Core.h
Added:
llvm/include/llvm/ExecutionEngine/Orc/CoreContainers.h
Modified:
llvm/include/llvm/ExecutionEngine/Orc/Core.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Core.h b/llvm/include/llvm/ExecutionEngine/Orc/Core.h
index f578455905f210..c755a18020553a 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/Core.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Core.h
@@ -19,6 +19,7 @@
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ExecutionEngine/JITLink/JITLinkDylib.h"
#include "llvm/ExecutionEngine/JITSymbol.h"
+#include "llvm/ExecutionEngine/Orc/CoreContainers.h"
#include "llvm/ExecutionEngine/Orc/ExecutorProcessControl.h"
#include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
#include "llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h"
@@ -109,23 +110,6 @@ class ResourceManager {
ResourceKey SrcK) = 0;
};
-/// A set of symbol names (represented by SymbolStringPtrs for
-// efficiency).
-using SymbolNameSet = DenseSet<SymbolStringPtr>;
-
-/// A vector of symbol names.
-using SymbolNameVector = std::vector<SymbolStringPtr>;
-
-/// A map from symbol names (as SymbolStringPtrs) to JITSymbols
-/// (address/flags pairs).
-using SymbolMap = DenseMap<SymbolStringPtr, ExecutorSymbolDef>;
-
-/// A map from symbol names (as SymbolStringPtrs) to JITSymbolFlags.
-using SymbolFlagsMap = DenseMap<SymbolStringPtr, JITSymbolFlags>;
-
-/// A map from JITDylibs to sets of symbols.
-using SymbolDependenceMap = DenseMap<JITDylib *, SymbolNameSet>;
-
/// Lookup flags that apply to each dylib in the search order for a lookup.
///
/// If MatchHiddenSymbolsOnly is used (the default) for a given dylib, then
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/CoreContainers.h b/llvm/include/llvm/ExecutionEngine/Orc/CoreContainers.h
new file mode 100644
index 00000000000000..06d5aef0119f9b
--- /dev/null
+++ b/llvm/include/llvm/ExecutionEngine/Orc/CoreContainers.h
@@ -0,0 +1,47 @@
+//===---- CoreContainers.h - Symbol Containers for Core APIs ----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Symbol container types for core ORC APIs.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_EXECUTIONENGINE_ORC_CORECONTAINERS_H
+#define LLVM_EXECUTIONENGINE_ORC_CORECONTAINERS_H
+
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/DenseSet.h"
+#include "llvm/ExecutionEngine/JITSymbol.h"
+#include "llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h"
+#include "llvm/ExecutionEngine/Orc/SymbolStringPool.h"
+
+#include <vector>
+
+namespace llvm::orc {
+
+class JITDylib;
+
+/// A set of symbol names (represented by SymbolStringPtrs for
+// efficiency).
+using SymbolNameSet = DenseSet<SymbolStringPtr>;
+
+/// A vector of symbol names.
+using SymbolNameVector = std::vector<SymbolStringPtr>;
+
+/// A map from symbol names (as SymbolStringPtrs) to JITSymbols
+/// (address/flags pairs).
+using SymbolMap = DenseMap<SymbolStringPtr, ExecutorSymbolDef>;
+
+/// A map from symbol names (as SymbolStringPtrs) to JITSymbolFlags.
+using SymbolFlagsMap = DenseMap<SymbolStringPtr, JITSymbolFlags>;
+
+/// A map from JITDylibs to sets of symbols.
+using SymbolDependenceMap = DenseMap<JITDylib *, SymbolNameSet>;
+
+} // End namespace llvm::orc
+
+#endif // LLVM_EXECUTIONENGINE_ORC_CORECONTAINERS_H
More information about the llvm-commits
mailing list