mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[ORC] Rename NullResolver to NullLegacyResolver.
This resolver conforms to the LegacyJITSymbolResolver interface, and will be replaced with a null-returning resolver conforming to the newer orc::SymbolResolver interface in the near future. This patch renames the class to avoid a clash. llvm-svn: 324175
This commit is contained in:
parent
2bff9420a0
commit
75842deb9b
@ -22,7 +22,7 @@ namespace orc {
|
||||
|
||||
/// SymbolResolver impliementation that rejects all resolution requests.
|
||||
/// Useful for clients that have no cross-object fixups.
|
||||
class NullResolver : public LegacyJITSymbolResolver {
|
||||
class NullLegacyResolver : public LegacyJITSymbolResolver {
|
||||
public:
|
||||
JITSymbol findSymbol(const std::string &Name) final;
|
||||
|
||||
|
@ -14,11 +14,12 @@
|
||||
namespace llvm {
|
||||
namespace orc {
|
||||
|
||||
JITSymbol NullResolver::findSymbol(const std::string &Name) {
|
||||
JITSymbol NullLegacyResolver::findSymbol(const std::string &Name) {
|
||||
llvm_unreachable("Unexpected cross-object symbol reference");
|
||||
}
|
||||
|
||||
JITSymbol NullResolver::findSymbolInLogicalDylib(const std::string &Name) {
|
||||
JITSymbol
|
||||
NullLegacyResolver::findSymbolInLogicalDylib(const std::string &Name) {
|
||||
llvm_unreachable("Unexpected cross-object symbol reference");
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ TEST(ObjectTransformLayerTest, Main) {
|
||||
|
||||
// Test addObject with T1 (allocating)
|
||||
auto Obj1 = std::make_shared<MockObjectFile>(211);
|
||||
auto SR = std::make_shared<NullResolver>();
|
||||
auto SR = std::make_shared<NullLegacyResolver>();
|
||||
M.expectAddObject(Obj1, SR);
|
||||
auto H = cantFail(T1.addObject(std::move(Obj1), SR));
|
||||
M.verifyAddObject(H);
|
||||
@ -311,7 +311,7 @@ TEST(ObjectTransformLayerTest, Main) {
|
||||
|
||||
// Make sure that the calls from IRCompileLayer to ObjectTransformLayer
|
||||
// compile.
|
||||
auto Resolver = std::make_shared<NullResolver>();
|
||||
auto Resolver = std::make_shared<NullLegacyResolver>();
|
||||
cantFail(CompileLayer.addModule(std::shared_ptr<llvm::Module>(), Resolver));
|
||||
|
||||
// Make sure that the calls from ObjectTransformLayer to ObjectLinkingLayer
|
||||
|
@ -243,7 +243,7 @@ TEST_F(RTDyldObjectLinkingLayerExecutionTest, NoPrematureAllocation) {
|
||||
std::make_shared<object::OwningBinary<object::ObjectFile>>(
|
||||
Compile(*MB2.getModule()));
|
||||
|
||||
auto NR = std::make_shared<NullResolver>();
|
||||
auto NR = std::make_shared<NullLegacyResolver>();
|
||||
auto H = cantFail(ObjLayer.addObject(std::move(Obj1), NR));
|
||||
cantFail(ObjLayer.addObject(std::move(Obj2), NR));
|
||||
cantFail(ObjLayer.emitAndFinalize(H));
|
||||
|
@ -159,7 +159,7 @@ TEST(RemoteObjectLayer, AddObject) {
|
||||
});
|
||||
|
||||
cantFail(Client.addObject(std::move(TestObject),
|
||||
std::make_shared<NullResolver>()));
|
||||
std::make_shared<NullLegacyResolver>()));
|
||||
cantFail(ClientEP.callB<remote::utils::TerminateSession>());
|
||||
ServerThread.join();
|
||||
}
|
||||
@ -205,8 +205,8 @@ TEST(RemoteObjectLayer, AddObjectFailure) {
|
||||
cantFail(ServerEP.handleOne());
|
||||
});
|
||||
|
||||
auto HandleOrErr =
|
||||
Client.addObject(std::move(TestObject), std::make_shared<NullResolver>());
|
||||
auto HandleOrErr = Client.addObject(std::move(TestObject),
|
||||
std::make_shared<NullLegacyResolver>());
|
||||
|
||||
EXPECT_FALSE(HandleOrErr) << "Expected error from addObject";
|
||||
|
||||
@ -258,8 +258,8 @@ TEST(RemoteObjectLayer, RemoveObject) {
|
||||
cantFail(ServerEP.handleOne());
|
||||
});
|
||||
|
||||
auto H = cantFail(Client.addObject(std::move(TestObject),
|
||||
std::make_shared<NullResolver>()));
|
||||
auto H = cantFail(Client.addObject(std::move(TestObject),
|
||||
std::make_shared<NullLegacyResolver>()));
|
||||
|
||||
cantFail(Client.removeObject(H));
|
||||
|
||||
@ -309,8 +309,8 @@ TEST(RemoteObjectLayer, RemoveObjectFailure) {
|
||||
cantFail(ServerEP.handleOne());
|
||||
});
|
||||
|
||||
auto H = cantFail(Client.addObject(std::move(TestObject),
|
||||
std::make_shared<NullResolver>()));
|
||||
auto H = cantFail(Client.addObject(std::move(TestObject),
|
||||
std::make_shared<NullLegacyResolver>()));
|
||||
|
||||
auto Err = Client.removeObject(H);
|
||||
EXPECT_TRUE(!!Err) << "Expected error from removeObject";
|
||||
@ -374,7 +374,7 @@ TEST(RemoteObjectLayer, FindSymbol) {
|
||||
});
|
||||
|
||||
cantFail(Client.addObject(std::move(TestObject),
|
||||
std::make_shared<NullResolver>()));
|
||||
std::make_shared<NullLegacyResolver>()));
|
||||
|
||||
// Check that we can find and materialize a valid symbol.
|
||||
auto Sym1 = Client.findSymbol("foobar", true);
|
||||
@ -463,7 +463,7 @@ TEST(RemoteObjectLayer, FindSymbolIn) {
|
||||
});
|
||||
|
||||
auto H = cantFail(Client.addObject(std::move(TestObject),
|
||||
std::make_shared<NullResolver>()));
|
||||
std::make_shared<NullLegacyResolver>()));
|
||||
|
||||
auto Sym1 = Client.findSymbolIn(H, "foobar", true);
|
||||
|
||||
@ -523,7 +523,7 @@ TEST(RemoteObjectLayer, EmitAndFinalize) {
|
||||
});
|
||||
|
||||
auto H = cantFail(Client.addObject(std::move(TestObject),
|
||||
std::make_shared<NullResolver>()));
|
||||
std::make_shared<NullLegacyResolver>()));
|
||||
|
||||
auto Err = Client.emitAndFinalize(H);
|
||||
EXPECT_FALSE(!!Err) << "emitAndFinalize should work";
|
||||
@ -573,7 +573,7 @@ TEST(RemoteObjectLayer, EmitAndFinalizeFailure) {
|
||||
});
|
||||
|
||||
auto H = cantFail(Client.addObject(std::move(TestObject),
|
||||
std::make_shared<NullResolver>()));
|
||||
std::make_shared<NullLegacyResolver>()));
|
||||
|
||||
auto Err = Client.emitAndFinalize(H);
|
||||
EXPECT_TRUE(!!Err) << "emitAndFinalize should work";
|
||||
|
Loading…
x
Reference in New Issue
Block a user