summaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Core.cpp
diff options
context:
space:
mode:
authorRahul Joshi <rjoshi@nvidia.com>2024-10-11 05:26:03 -0700
committerGitHub <noreply@github.com>2024-10-11 05:26:03 -0700
commitfa789dffb1e12c2aece0187aeacc48dfb1768340 (patch)
treecebfdc0d8b0111115cbefeb8d2927fe8c2cfbdfb /llvm/lib/IR/Core.cpp
parent900ea21ffb38ba5b783b20f394c43c6c89d58086 (diff)
[NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (#111752)
Rename the function to reflect its correct behavior and to be consistent with `Module::getOrInsertFunction`. This is also in preparation of adding a new `Intrinsic::getDeclaration` that will have behavior similar to `Module::getFunction` (i.e, just lookup, no creation).
Diffstat (limited to 'llvm/lib/IR/Core.cpp')
-rw-r--r--llvm/lib/IR/Core.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index ee084e870263..1cf998c68500 100644
--- a/llvm/lib/IR/Core.cpp
+++ b/llvm/lib/IR/Core.cpp
@@ -2468,7 +2468,7 @@ LLVMValueRef LLVMGetIntrinsicDeclaration(LLVMModuleRef Mod,
size_t ParamCount) {
ArrayRef<Type*> Tys(unwrap(ParamTypes), ParamCount);
auto IID = llvm_map_to_intrinsic_id(ID);
- return wrap(llvm::Intrinsic::getDeclaration(unwrap(Mod), IID, Tys));
+ return wrap(llvm::Intrinsic::getOrInsertDeclaration(unwrap(Mod), IID, Tys));
}
const char *LLVMIntrinsicGetName(unsigned ID, size_t *NameLength) {