From 91dec11b6fe070c99db71a455c8af6e29d3bf8d9 Mon Sep 17 00:00:00 2001 From: Warren Jacinto Date: Wed, 28 Feb 2024 00:10:50 +0530 Subject: [PATCH] replace TimePasses with ShowTimers for older clang versions --- tools/ClangPlugin.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/ClangPlugin.cpp b/tools/ClangPlugin.cpp index ace6b7fac..eef397812 100644 --- a/tools/ClangPlugin.cpp +++ b/tools/ClangPlugin.cpp @@ -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()) {