Skip to content

Commit

Permalink
Fix builtin macros for memory operations
Browse files Browse the repository at this point in the history
  • Loading branch information
vaithak committed Feb 26, 2024
1 parent 7e85226 commit 0662010
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Differentiator/CladUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -643,17 +643,17 @@ namespace clad {
}

bool IsMemoryAllocationFunction(const clang::FunctionDecl* FD) {
if (FD->getBuiltinID() == Builtin::BImalloc)
if (FD->getBuiltinID() == Builtin::ID::BImalloc)
return true;
if (FD->getBuiltinID() == Builtin::BIcalloc)
if (FD->getBuiltinID() == Builtin::ID::BIcalloc)
return true;
if (FD->getBuiltinID() == Builtin::BIrealloc)
if (FD->getBuiltinID() == Builtin::ID::BIrealloc)
return true;
return false;
}

bool IsMemoryDeallocationFunction(const clang::FunctionDecl* FD) {
return FD->getBuiltinID() == Builtin::BIfree;
return FD->getBuiltinID() == Builtin::ID::BIfree;
}
} // namespace utils
} // namespace clad

0 comments on commit 0662010

Please sign in to comment.