Skip to content

Commit

Permalink
Try a fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vaithak committed May 19, 2024
1 parent 824fd5d commit f30dedb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tools/ClangPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,12 @@ class CladTimerGroup {
bool HandleTopLevelDecl(clang::DeclGroupRef D) override {
if (D.isSingleDecl())
if (auto* FD = llvm::dyn_cast<clang::FunctionDecl>(D.getSingleDecl()))
if (m_DFC.IsDerivative(FD)) {
assert(!m_Multiplexer &&
"Must happen only if we failed to rearrange the consumers");
// If we build the derivative in a non-standard (with no Multiplexer)
// setup, we exit early to give control to the non-standard setup for
// code generation.
// FIXME: This should go away if Cling starts using the clang driver.
if (!m_Multiplexer && m_DFC.IsDerivative(FD))
return true;
}

HandleTopLevelDeclForClad(D);
AppendDelayed({CallKind::HandleTopLevelDecl, D});
Expand Down

0 comments on commit f30dedb

Please sign in to comment.