diff options
author | Lang Hames <lhames@gmail.com> | 2018-10-15 05:07:54 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2018-10-15 05:07:54 +0000 |
commit | a5157d6f4bed542993ae83d7a7826146eed3e019 (patch) | |
tree | 881ca55e5c456ef6042268ac8f7d02825f74d0ae /llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp | |
parent | 3c01508409d3e9a7e43950318b626e2bd1bf7e78 (diff) | |
download | bcm5719-llvm-a5157d6f4bed542993ae83d7a7826146eed3e019.tar.gz bcm5719-llvm-a5157d6f4bed542993ae83d7a7826146eed3e019.zip |
[ORC] Simplify naming for JITDylib definition generators.
Renames:
JITDylib's setFallbackDefinitionGenerator method to setGenerator.
DynamicLibraryFallbackGenerator class to DynamicLibrarySearchGenerator.
ReexportsFallbackDefinitionGenerator to ReexportsGenerator.
llvm-svn: 344489
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp')
-rw-r--r-- | llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp b/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp index c8fa6ef5297..1ccc4755957 100644 --- a/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp @@ -342,17 +342,15 @@ TEST_F(CoreAPIsStandardTest, TestThatReExportsDontUnnecessarilyMaterialize) { EXPECT_FALSE(BarMaterialized) << "Bar should not have been materialized"; } -TEST_F(CoreAPIsStandardTest, TestReexportsFallbackGenerator) { - // Test that a re-exports fallback generator can dynamically generate - // reexports. +TEST_F(CoreAPIsStandardTest, TestReexportsGenerator) { + // Test that a re-exports generator can dynamically generate reexports. auto &JD2 = ES.createJITDylib("JD2"); cantFail(JD2.define(absoluteSymbols({{Foo, FooSym}, {Bar, BarSym}}))); auto Filter = [this](SymbolStringPtr Name) { return Name != Bar; }; - JD.setFallbackDefinitionGenerator( - ReexportsFallbackDefinitionGenerator(JD2, Filter)); + JD.setGenerator(ReexportsGenerator(JD2, Filter)); auto Flags = JD.lookupFlags({Foo, Bar, Baz}); EXPECT_EQ(Flags.size(), 1U) << "Unexpected number of results"; @@ -679,14 +677,13 @@ TEST_F(CoreAPIsStandardTest, DefineMaterializingSymbol) { << "Expected Bar == BarSym"; } -TEST_F(CoreAPIsStandardTest, FallbackDefinitionGeneratorTest) { +TEST_F(CoreAPIsStandardTest, GeneratorTest) { cantFail(JD.define(absoluteSymbols({{Foo, FooSym}}))); - JD.setFallbackDefinitionGenerator( - [&](JITDylib &JD2, const SymbolNameSet &Names) { - cantFail(JD2.define(absoluteSymbols({{Bar, BarSym}}))); - return SymbolNameSet({Bar}); - }); + JD.setGenerator([&](JITDylib &JD2, const SymbolNameSet &Names) { + cantFail(JD2.define(absoluteSymbols({{Bar, BarSym}}))); + return SymbolNameSet({Bar}); + }); auto Result = cantFail(ES.lookup({&JD}, {Foo, Bar})); |