Skip to content

Commit b4134e1

Browse files
committed
[NFC] IRGen: Forming signatures of functions.
1 parent e59dcd1 commit b4134e1

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/IRGen/GenCall.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,6 +2491,12 @@ SignatureExpansionABIDetails Signature::getUncachedABIDetails(
24912491
return result;
24922492
}
24932493

2494+
Signature Signature::forFunction(llvm::Function *fn) {
2495+
auto sig = Signature(fn->getFunctionType(), fn->getAttributes(),
2496+
fn->getCallingConv());
2497+
return sig;
2498+
}
2499+
24942500
Signature Signature::forCoroutineContinuation(IRGenModule &IGM,
24952501
CanSILFunctionType fnType) {
24962502
assert(fnType->isCoroutine());

lib/IRGen/Signature.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ class Signature {
212212
getUncachedABIDetails(IRGenModule &IGM, CanSILFunctionType formalType,
213213
FunctionPointerKind kind);
214214

215+
static Signature forFunction(llvm::Function *fn);
216+
215217
/// Compute the signature of a coroutine's continuation function.
216218
static Signature forCoroutineContinuation(IRGenModule &IGM,
217219
CanSILFunctionType coroType);

0 commit comments

Comments
 (0)