Skip to content

Commit

Permalink
Fix build for LLVM 17 (#1323)
Browse files Browse the repository at this point in the history
* Use std::optional for llvm 16+

* Implicitly convert Options struct to std::optional and llvm::Optional depending on LLVM version
  • Loading branch information
pengmai authored Jul 10, 2023
1 parent de02665 commit 2d2fdff
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions enzyme/Enzyme/Enzyme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1120,11 +1120,10 @@ class EnzymeBase {
return {};
}

return Optional<Options>({differet, tape, dynamic_interface, trace,
observations, likelihood, diffeLikelihood, width,
allocatedTapeSize, freeMemory, returnUsed,
tapeIsPointer, differentialReturn, diffeTrace,
retType, primalReturn, ActiveRandomVariables});
return Options({differet, tape, dynamic_interface, trace, observations,
likelihood, diffeLikelihood, width, allocatedTapeSize,
freeMemory, returnUsed, tapeIsPointer, differentialReturn,
diffeTrace, retType, primalReturn, ActiveRandomVariables});
}

static FnTypeInfo
Expand Down

0 comments on commit 2d2fdff

Please sign in to comment.