[llvm] [LLVM] Re-add `Intrinsic::getDeclaration` for out-of-tree code (PR #112242)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 13:17:31 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Rahul Joshi (jurahul)
<details>
<summary>Changes</summary>
Re-add `Intrinsic::getDeclaration` (which was renamed to `getOrInsertDeclaration` in https://github.com/llvm/llvm-project/pull/111752) as a deprecated function. It will be removed in the next LLVM release.
---
Full diff: https://github.com/llvm/llvm-project/pull/112242.diff
1 Files Affected:
- (modified) llvm/include/llvm/IR/Intrinsics.h (+5)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/112242
More information about the llvm-commits
mailing list