[llvm] b9f0867 - [LLVM] Re-add `Intrinsic::getDeclaration` for out-of-tree code (#112242)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 19:21:32 PDT 2024
Author: Rahul Joshi
Date: 2024-10-14T19:21:28-07:00
New Revision: b9f08676abcfbb226c67b5ac2a7bc5b33254b915
URL: https://github.com/llvm/llvm-project/commit/b9f08676abcfbb226c67b5ac2a7bc5b33254b915
DIFF: https://github.com/llvm/llvm-project/commit/b9f08676abcfbb226c67b5ac2a7bc5b33254b915.diff
LOG: [LLVM] Re-add `Intrinsic::getDeclaration` for out-of-tree code (#112242)
Added:
Modified:
llvm/include/llvm/IR/Intrinsics.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/Intrinsics.h b/llvm/include/llvm/IR/Intrinsics.h
index 8c37925732a83a..49f4fe4c5c3d7f 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<Type *> Tys = {});
+ LLVM_DEPRECATED("Use getOrInsertDeclaration instead",
+ "getOrInsertDeclaration")
+ inline Function *getDeclaration(Module *M, ID id, ArrayRef<Type *> 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
More information about the llvm-commits
mailing list