-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LLVM] Re-add Intrinsic::getDeclaration
for out-of-tree code
#112242
Conversation
Re-add `Intrinsic::getDeclaration` (which was renamed to `getOrInsertDeclaration` in an earlier commit) as a deprecated function. It will be removed in the next LLVM release.
@llvm/pr-subscribers-llvm-ir Author: Rahul Joshi (jurahul) ChangesRe-add Full diff: https://github.com/llvm/llvm-project/pull/112242.diff 1 Files Affected:
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/3480 Here is the relevant piece of the build log for the reference
|
Re-add
Intrinsic::getDeclaration
(which was renamed togetOrInsertDeclaration
in #111752) as a deprecated function. It will be removed in the next LLVM release.