Skip to content

Commit

Permalink
replace TimePasses with ShowTimers for older clang versions
Browse files Browse the repository at this point in the history
  • Loading branch information
DeadSpheroid committed Feb 27, 2024
1 parent 9c5bf65 commit 91dec11
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/ClangPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,14 @@ namespace clad {
// FIXME: Move the timing inside the DerivativeBuilder. This would
// require to pass in the DifferentiationOptions in the DiffPlan.
// derive the collected functions

#if CLANG_VERSION_MAJOR > 11
bool WantTiming =
getenv("LIBCLAD_TIMING") || m_CI.getCodeGenOpts().TimePasses;
#else
bool WantTiming =
getenv("LIBCLAD_TIMING") || m_CI.getFrontendOpts().ShowTimers;
#endif

auto DFI = m_DFC.Find(request);
if (DFI.IsValid()) {
Expand Down

0 comments on commit 91dec11

Please sign in to comment.