1 //===------ NullResolver.h - Reject symbol lookup requests ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Defines a RuntimeDyld::SymbolResolver subclass that rejects all symbol
11 // resolution requests, for clients that have no cross-object fixups.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_EXECUTIONENGINE_ORC_NULLRESOLVER_H
16 #define LLVM_EXECUTIONENGINE_ORC_NULLRESOLVER_H
18 #include "llvm/ExecutionEngine/Orc/Legacy.h"
19 #include "llvm/ExecutionEngine/RuntimeDyld.h"
24 class NullResolver : public SymbolResolver {
26 SymbolNameSet getResponsibilitySet(const SymbolNameSet &Symbols) final;
28 SymbolNameSet lookup(std::shared_ptr<AsynchronousSymbolQuery> Query,
29 SymbolNameSet Symbols) final;
32 /// SymbolResolver impliementation that rejects all resolution requests.
33 /// Useful for clients that have no cross-object fixups.
34 class NullLegacyResolver : public LegacyJITSymbolResolver {
36 JITSymbol findSymbol(const std::string &Name) final;
38 JITSymbol findSymbolInLogicalDylib(const std::string &Name) final;
41 } // End namespace orc.
42 } // End namespace llvm.
44 #endif // LLVM_EXECUTIONENGINE_ORC_NULLRESOLVER_H