[llvm] d031101 - [IR] Simplify Intrinsic::getDeclaration. NFC.
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 29 02:45:31 PDT 2022
Author: Jay Foad
Date: 2022-07-29T10:45:22+01:00
New Revision: d03110155b8655cac5384aff4795957de2f3f6ef
URL: https://github.com/llvm/llvm-project/commit/d03110155b8655cac5384aff4795957de2f3f6ef
DIFF: https://github.com/llvm/llvm-project/commit/d03110155b8655cac5384aff4795957de2f3f6ef.diff
LOG: [IR] Simplify Intrinsic::getDeclaration. NFC.
Added:
Modified:
llvm/lib/IR/Function.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index d4138133721e8..85f54c76cba09 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -1423,9 +1423,8 @@ Function *Intrinsic::getDeclaration(Module *M, ID id, ArrayRef<Type*> Tys) {
// because intrinsics must be a specific type.
auto *FT = getType(M->getContext(), id, Tys);
return cast<Function>(
- M->getOrInsertFunction(Tys.empty() ? getName(id)
- : getName(id, Tys, M, FT),
- getType(M->getContext(), id, Tys))
+ M->getOrInsertFunction(
+ Tys.empty() ? getName(id) : getName(id, Tys, M, FT), FT)
.getCallee());
}
More information about the llvm-commits
mailing list