[IR] Simplify Intrinsic::getDeclaration. NFC.

This commit is contained in:
Jay Foad 2022-07-29 10:40:58 +01:00
parent 56ab2f4ccd
commit d03110155b
1 changed files with 2 additions and 3 deletions

View File

@ -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());
}