LLVM  7.0.0
NullResolver.h
Go to the documentation of this file.
1 //===------ NullResolver.h - Reject symbol lookup requests ------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // Defines a RuntimeDyld::SymbolResolver subclass that rejects all symbol
11 // resolution requests, for clients that have no cross-object fixups.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_EXECUTIONENGINE_ORC_NULLRESOLVER_H
16 #define LLVM_EXECUTIONENGINE_ORC_NULLRESOLVER_H
17 
20 
21 namespace llvm {
22 namespace orc {
23 
24 class NullResolver : public SymbolResolver {
25 public:
26  SymbolFlagsMap lookupFlags(const SymbolNameSet &Symbols) override;
27 
28  SymbolNameSet lookup(std::shared_ptr<AsynchronousSymbolQuery> Query,
29  SymbolNameSet Symbols) override;
30 };
31 
32 /// SymbolResolver impliementation that rejects all resolution requests.
33 /// Useful for clients that have no cross-object fixups.
35 public:
36  JITSymbol findSymbol(const std::string &Name) final;
37 
38  JITSymbol findSymbolInLogicalDylib(const std::string &Name) final;
39 };
40 
41 } // End namespace orc.
42 } // End namespace llvm.
43 
44 #endif // LLVM_EXECUTIONENGINE_ORC_NULLRESOLVER_H
Represents a symbol in the JIT.
Definition: JITSymbol.h:186
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
Legacy symbol resolution interface.
Definition: JITSymbol.h:318
std::map< SymbolStringPtr, JITSymbolFlags > SymbolFlagsMap
A map from symbol names (as SymbolStringPtrs) to JITSymbolFlags.
Definition: Core.h:57
SymbolNameSet lookup(std::shared_ptr< AsynchronousSymbolQuery > Query, SymbolNameSet Symbols) override
For each symbol in Symbols that can be found, assigns that symbols value in Query.
SymbolFlagsMap lookupFlags(const SymbolNameSet &Symbols) override
Returns the flags for each symbol in Symbols that can be found, along with the set of symbol that cou...
SymbolResolver impliementation that rejects all resolution requests.
Definition: NullResolver.h:34
SymbolResolver is a composable interface for looking up symbol flags and addresses using the Asynchro...
Definition: Legacy.h:30
static void Query(const MachineInstr &MI, AliasAnalysis &AA, bool &Read, bool &Write, bool &Effects, bool &StackPointer)
std::set< SymbolStringPtr > SymbolNameSet
A set of symbol names (represented by SymbolStringPtrs for.
Definition: Core.h:44