From e5a36adf13492e5d2feeb802dda415e84561639c Mon Sep 17 00:00:00 2001 From: William Moses Date: Sun, 3 Nov 2024 23:33:27 -0600 Subject: [PATCH] Fix named bcloader (#2150) --- enzyme/BCLoad/BCLoader.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/enzyme/BCLoad/BCLoader.cpp b/enzyme/BCLoad/BCLoader.cpp index 015ecd85fbb..70a220a9ea3 100644 --- a/enzyme/BCLoad/BCLoader.cpp +++ b/enzyme/BCLoad/BCLoader.cpp @@ -75,8 +75,7 @@ bool provideDefinitions(Module &M, std::set ignoreFunctions, for (auto &&[realname, F] : name_rewrites) { auto decl = M.getOrInsertFunction(realname, F->getFunctionType()); - auto entry = BasicBlock::Create(F->getContext(), "entry", - cast(decl.getCallee())); + auto entry = BasicBlock::Create(F->getContext(), "entry", F); IRBuilder<> B(entry); SmallVector vals; for (auto &arg : F->args())