[llvm] r336767 - Revert r336760: "[ORC] Add unit tests for the reexports utility that were..."
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 10 23:46:17 PDT 2018
Author: lhames
Date: Tue Jul 10 23:46:17 2018
New Revision: 336767
URL: http://llvm.org/viewvc/llvm-project?rev=336767&view=rev
Log:
Revert r336760: "[ORC] Add unit tests for the reexports utility that were..."
This patch broke a few buildbots. I will investigate and re-apply when I have
a fix.
Modified:
llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp
llvm/trunk/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
Modified: llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp?rev=336767&r1=336766&r2=336767&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp Tue Jul 10 23:46:17 2018
@@ -462,7 +462,7 @@ void ReExportsMaterializationUnit::mater
// FIXME: We're creating a SymbolFlagsMap and a std::map of
// std::sets just to add one dependency here. This needs a
// re-think.
- Resolved.insert(KV.second.Aliasee);
+ Resolved.insert(KV.first);
}
QueryInfo->R.resolve(ResolutionMap);
Modified: llvm/trunk/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp?rev=336767&r1=336766&r2=336767&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp Tue Jul 10 23:46:17 2018
@@ -300,48 +300,6 @@ TEST_F(CoreAPIsStandardTest, TestChained
<< "\"Baz\"'s address should match \"Foo\"'s";
}
-TEST_F(CoreAPIsStandardTest, TestBasicReExports) {
- // Test that the basic use case of re-exporting a single symbol from another
- // VSO works.
- cantFail(V.define(absoluteSymbols({{Foo, FooSym}})));
-
- auto &V2 = ES.createVSO("V2");
-
- cantFail(V2.define(reexports(V, {{Bar, {Foo, BarSym.getFlags()}}})));
-
- auto Result = cantFail(lookup({&V2}, Bar));
- EXPECT_EQ(Result.getAddress(), FooSym.getAddress())
- << "Re-export Bar for symbol Foo should match FooSym's address";
-}
-
-TEST_F(CoreAPIsStandardTest, TestThatReExportsDontUnnecessarilyMaterialize) {
- // Test that re-exports do not materialize symbols that have not been queried
- // for.
- cantFail(V.define(absoluteSymbols({{Foo, FooSym}})));
-
- bool BarMaterialized = false;
- auto BarMU = llvm::make_unique<SimpleMaterializationUnit>(
- SymbolFlagsMap({{Bar, BarSym.getFlags()}}),
- [&](MaterializationResponsibility R) {
- BarMaterialized = true;
- R.resolve({{Bar, BarSym}});
- R.finalize();
- });
-
- cantFail(V.define(BarMU));
-
- auto &V2 = ES.createVSO("V2");
-
- cantFail(V2.define(reexports(
- V, {{Baz, {Foo, BazSym.getFlags()}}, {Qux, {Bar, QuxSym.getFlags()}}})));
-
- auto Result = cantFail(lookup({&V2}, Baz));
- EXPECT_EQ(Result.getAddress(), FooSym.getAddress())
- << "Re-export Baz for symbol Foo should match FooSym's address";
-
- EXPECT_FALSE(BarMaterialized) << "Bar should not have been materialized";
-}
-
TEST_F(CoreAPIsStandardTest, TestTrivialCircularDependency) {
Optional<MaterializationResponsibility> FooR;
auto FooMU = llvm::make_unique<SimpleMaterializationUnit>(
More information about the llvm-commits
mailing list