From 6fe22058280bceb03c8d54713a89b8ba5c20287a Mon Sep 17 00:00:00 2001 From: Matin Raayai <30674652+matinraayai@users.noreply.github.com> Date: Wed, 21 Feb 2024 18:44:22 -0500 Subject: [PATCH] Fixed incorrect usage of llvm::Function::splice. --- enzyme/Enzyme/Enzyme.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/enzyme/Enzyme/Enzyme.cpp b/enzyme/Enzyme/Enzyme.cpp index 055b6f394842..61ff9ebb15d5 100644 --- a/enzyme/Enzyme/Enzyme.cpp +++ b/enzyme/Enzyme/Enzyme.cpp @@ -2110,8 +2110,7 @@ class EnzymeBase { // Move the truncated body into the original function F.deleteBody(); - F.getBasicBlockList().splice(F.begin(), - TruncatedFunc->getBasicBlockList()); + F.splice(F.begin(), TruncatedFunc); RemapFunction(F, Mapping, RF_NoModuleLevelChanges | RF_IgnoreMissingLocals); TruncatedFunc->deleteBody();