mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
The new method name/behavior more closely models the way it was being used. It also fixes an assertion that can occur when using the new ORC Core APIs, where flags alone don't necessarily provide enough context to decide whether the caller is responsible for materializing a given symbol (which was always the reason this API existed). The default implementation of getResponsibilitySet uses lookupFlags to determine responsibility as before, so existing JITSymbolResolvers should continue to work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340874 91177308-0d34-0410-b5e6-96231b3b80d8
45 lines
1.4 KiB
C++
45 lines
1.4 KiB
C++
//===------ NullResolver.h - Reject symbol lookup requests ------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Defines a RuntimeDyld::SymbolResolver subclass that rejects all symbol
|
|
// resolution requests, for clients that have no cross-object fixups.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_EXECUTIONENGINE_ORC_NULLRESOLVER_H
|
|
#define LLVM_EXECUTIONENGINE_ORC_NULLRESOLVER_H
|
|
|
|
#include "llvm/ExecutionEngine/Orc/Legacy.h"
|
|
#include "llvm/ExecutionEngine/RuntimeDyld.h"
|
|
|
|
namespace llvm {
|
|
namespace orc {
|
|
|
|
class NullResolver : public SymbolResolver {
|
|
public:
|
|
SymbolNameSet getResponsibilitySet(const SymbolNameSet &Symbols) final;
|
|
|
|
SymbolNameSet lookup(std::shared_ptr<AsynchronousSymbolQuery> Query,
|
|
SymbolNameSet Symbols) final;
|
|
};
|
|
|
|
/// SymbolResolver impliementation that rejects all resolution requests.
|
|
/// Useful for clients that have no cross-object fixups.
|
|
class NullLegacyResolver : public LegacyJITSymbolResolver {
|
|
public:
|
|
JITSymbol findSymbol(const std::string &Name) final;
|
|
|
|
JITSymbol findSymbolInLogicalDylib(const std::string &Name) final;
|
|
};
|
|
|
|
} // End namespace orc.
|
|
} // End namespace llvm.
|
|
|
|
#endif // LLVM_EXECUTIONENGINE_ORC_NULLRESOLVER_H
|