• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===---------- NullResolver.cpp - Reject symbol lookup requests ----------===//
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 #include "llvm/ExecutionEngine/Orc/NullResolver.h"
10 
11 #include "llvm/Support/ErrorHandling.h"
12 
13 namespace llvm {
14 namespace orc {
15 
getResponsibilitySet(const SymbolNameSet & Symbols)16 SymbolNameSet NullResolver::getResponsibilitySet(const SymbolNameSet &Symbols) {
17   return Symbols;
18 }
19 
20 SymbolNameSet
lookup(std::shared_ptr<AsynchronousSymbolQuery> Query,SymbolNameSet Symbols)21 NullResolver::lookup(std::shared_ptr<AsynchronousSymbolQuery> Query,
22                      SymbolNameSet Symbols) {
23   assert(Symbols.empty() && "Null resolver: Symbols must be empty");
24   return Symbols;
25 }
26 
findSymbol(const std::string & Name)27 JITSymbol NullLegacyResolver::findSymbol(const std::string &Name) {
28   llvm_unreachable("Unexpected cross-object symbol reference");
29 }
30 
31 JITSymbol
findSymbolInLogicalDylib(const std::string & Name)32 NullLegacyResolver::findSymbolInLogicalDylib(const std::string &Name) {
33   llvm_unreachable("Unexpected cross-object symbol reference");
34 }
35 
36 } // End namespace orc.
37 } // End namespace llvm.
38