From 0662010ea0d5ab9832b5e43b52b9d05b5d4a2597 Mon Sep 17 00:00:00 2001 From: Vaibhav Thakkar Date: Mon, 26 Feb 2024 12:41:46 +0100 Subject: [PATCH] Fix builtin macros for memory operations --- lib/Differentiator/CladUtils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Differentiator/CladUtils.cpp b/lib/Differentiator/CladUtils.cpp index 3d1a872c9..28689c74d 100644 --- a/lib/Differentiator/CladUtils.cpp +++ b/lib/Differentiator/CladUtils.cpp @@ -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