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 48