Skip to content

Commit 81613dd

Browse files
committed
[ORC] Move some typedefs from Core.h to a new header, CoreContainers.h. NFC.
This is a first step towards breaking up Core.h
1 parent a5a1612 commit 81613dd

File tree

2 files changed

+48
-17
lines changed

2 files changed

+48
-17
lines changed

llvm/include/llvm/ExecutionEngine/Orc/Core.h

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "llvm/ADT/IntrusiveRefCntPtr.h"
2020
#include "llvm/ExecutionEngine/JITLink/JITLinkDylib.h"
2121
#include "llvm/ExecutionEngine/JITSymbol.h"
22+
#include "llvm/ExecutionEngine/Orc/CoreContainers.h"
2223
#include "llvm/ExecutionEngine/Orc/ExecutorProcessControl.h"
2324
#include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
2425
#include "llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h"
@@ -109,23 +110,6 @@ class ResourceManager {
109110
ResourceKey SrcK) = 0;
110111
};
111112

112-
/// A set of symbol names (represented by SymbolStringPtrs for
113-
// efficiency).
114-
using SymbolNameSet = DenseSet<SymbolStringPtr>;
115-
116-
/// A vector of symbol names.
117-
using SymbolNameVector = std::vector<SymbolStringPtr>;
118-
119-
/// A map from symbol names (as SymbolStringPtrs) to JITSymbols
120-
/// (address/flags pairs).
121-
using SymbolMap = DenseMap<SymbolStringPtr, ExecutorSymbolDef>;
122-
123-
/// A map from symbol names (as SymbolStringPtrs) to JITSymbolFlags.
124-
using SymbolFlagsMap = DenseMap<SymbolStringPtr, JITSymbolFlags>;
125-
126-
/// A map from JITDylibs to sets of symbols.
127-
using SymbolDependenceMap = DenseMap<JITDylib *, SymbolNameSet>;
128-
129113
/// Lookup flags that apply to each dylib in the search order for a lookup.
130114
///
131115
/// If MatchHiddenSymbolsOnly is used (the default) for a given dylib, then
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
//===---- CoreContainers.h - Symbol Containers for Core APIs ----*- 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+
// Symbol container types for core ORC APIs.
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
#ifndef LLVM_EXECUTIONENGINE_ORC_CORECONTAINERS_H
14+
#define LLVM_EXECUTIONENGINE_ORC_CORECONTAINERS_H
15+
16+
#include "llvm/ADT/DenseMap.h"
17+
#include "llvm/ADT/DenseSet.h"
18+
#include "llvm/ExecutionEngine/JITSymbol.h"
19+
#include "llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h"
20+
#include "llvm/ExecutionEngine/Orc/SymbolStringPool.h"
21+
22+
#include <vector>
23+
24+
namespace llvm::orc {
25+
26+
class JITDylib;
27+
28+
/// A set of symbol names (represented by SymbolStringPtrs for
29+
// efficiency).
30+
using SymbolNameSet = DenseSet<SymbolStringPtr>;
31+
32+
/// A vector of symbol names.
33+
using SymbolNameVector = std::vector<SymbolStringPtr>;
34+
35+
/// A map from symbol names (as SymbolStringPtrs) to JITSymbols
36+
/// (address/flags pairs).
37+
using SymbolMap = DenseMap<SymbolStringPtr, ExecutorSymbolDef>;
38+
39+
/// A map from symbol names (as SymbolStringPtrs) to JITSymbolFlags.
40+
using SymbolFlagsMap = DenseMap<SymbolStringPtr, JITSymbolFlags>;
41+
42+
/// A map from JITDylibs to sets of symbols.
43+
using SymbolDependenceMap = DenseMap<JITDylib *, SymbolNameSet>;
44+
45+
} // End namespace llvm::orc
46+
47+
#endif // LLVM_EXECUTIONENGINE_ORC_CORECONTAINERS_H

0 commit comments

Comments
 (0)