Skip to content

Commit

Permalink
Handle new debug format conversion (#1737)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Feb 19, 2024
1 parent 2dcf5c5 commit f2a9361
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions enzyme/Enzyme/FunctionUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,16 @@ void PreProcessCache::AlwaysInline(Function *NewF) {

for (auto CI : ToInline) {
InlineFunctionInfo IFI;
#if LLVM_VERSION_MAJOR >= 18
auto F = CI->getCalledFunction();
if (CI->getParent()->IsNewDbgInfoFormat != F->IsNewDbgInfoFormat) {
if (CI->getParent()->IsNewDbgInfoFormat) {
F->convertToNewDbgValues();
} else {
F->convertFromNewDbgValues();
}
}
#endif
InlineFunction(*CI, IFI);
}
}
Expand Down

0 comments on commit f2a9361

Please sign in to comment.