diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-12 15:28:45 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-12 15:28:45 +0000 |
commit | 92343915989ee0292d2ae25f1e86e1cfad13dbd4 (patch) | |
tree | 305fd161a5ebefa0abb4f2cf7b5fc4f54672e34a /unittests/Linker | |
parent | 844cafe1c858209c0e01e0f92a9930d64e20aed9 (diff) |
Delete the deprecated LLVMLinkModules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260683 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Linker')
-rw-r--r-- | unittests/Linker/LinkModulesTest.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/unittests/Linker/LinkModulesTest.cpp b/unittests/Linker/LinkModulesTest.cpp index 322a44f8aafe..10a89f39869a 100644 --- a/unittests/Linker/LinkModulesTest.cpp +++ b/unittests/Linker/LinkModulesTest.cpp @@ -202,30 +202,6 @@ TEST_F(LinkModuleTest, TypeMerge) { M1->getNamedGlobal("t2")->getType()); } -TEST_F(LinkModuleTest, CAPISuccess) { - std::unique_ptr<Module> DestM(getExternal(Ctx, "foo")); - std::unique_ptr<Module> SourceM(getExternal(Ctx, "bar")); - char *errout = nullptr; - LLVMBool result = LLVMLinkModules(wrap(DestM.get()), wrap(SourceM.get()), - LLVMLinkerDestroySource, &errout); - EXPECT_EQ(0, result); - EXPECT_EQ(nullptr, errout); - // "bar" is present in destination module - EXPECT_NE(nullptr, DestM->getFunction("bar")); -} - -TEST_F(LinkModuleTest, CAPIFailure) { - // Symbol clash between two modules - std::unique_ptr<Module> DestM(getExternal(Ctx, "foo")); - std::unique_ptr<Module> SourceM(getExternal(Ctx, "foo")); - char *errout = nullptr; - LLVMBool result = LLVMLinkModules(wrap(DestM.get()), wrap(SourceM.get()), - LLVMLinkerDestroySource, &errout); - EXPECT_EQ(1, result); - EXPECT_STREQ("Linking globals named 'foo': symbol multiply defined!", errout); - LLVMDisposeMessage(errout); -} - TEST_F(LinkModuleTest, NewCAPISuccess) { std::unique_ptr<Module> DestM(getExternal(Ctx, "foo")); std::unique_ptr<Module> SourceM(getExternal(Ctx, "bar")); |