Skip to content

Commit

Permalink
Tweak moving into modules to not die when the target function is non-…
Browse files Browse the repository at this point in the history
…empty (#490)
  • Loading branch information
Peter Goodman authored Feb 22, 2021
1 parent a387b71 commit 6db8551
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/BC/Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1527,9 +1527,6 @@ void MoveFunctionIntoModule(llvm::Function *func, llvm::Module *dest_module) {
CHECK_NE(existing_decl_in_dest_module, func);
CHECK_EQ(existing_decl_in_dest_module->getFunctionType(),
func->getFunctionType());
CHECK(existing_decl_in_dest_module->isDeclaration())
<< "Function " << func->getName().str()
<< " already exists in destination module.";

existing_decl_in_dest_module->setName(llvm::Twine::createNull());
existing_decl_in_dest_module->setLinkage(llvm::GlobalValue::PrivateLinkage);
Expand Down

0 comments on commit 6db8551

Please sign in to comment.