From eae8fad38eecc3b83d15588b6efcee23be7bf300 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 14 Oct 2024 19:21:28 -0700 Subject: [PATCH] [LLVM] Re-add `Intrinsic::getDeclaration` for out-of-tree code (#112242) --- llvm/include/llvm/IR/Intrinsics.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llvm/include/llvm/IR/Intrinsics.h b/llvm/include/llvm/IR/Intrinsics.h index 8c37925732a83a9..49f4fe4c5c3d7f1 100644 --- a/llvm/include/llvm/IR/Intrinsics.h +++ b/llvm/include/llvm/IR/Intrinsics.h @@ -97,6 +97,11 @@ namespace Intrinsic { /// the intrinsic. Function *getOrInsertDeclaration(Module *M, ID id, ArrayRef Tys = {}); + LLVM_DEPRECATED("Use getOrInsertDeclaration instead", + "getOrInsertDeclaration") + inline Function *getDeclaration(Module *M, ID id, ArrayRef Tys = {}) { + return getOrInsertDeclaration(M, id, Tys); + } /// Looks up Name in NameTable via binary search. NameTable must be sorted /// and all entries must start with "llvm.". If NameTable contains an exact /// match for Name or a prefix of Name followed by a dot, its index in