We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7eaf573 commit 68564f1Copy full SHA for 68564f1
include/swift/SIL/SILFunction.h
@@ -1422,6 +1422,14 @@ class SILFunction
1422
return getArguments().back();
1423
}
1424
1425
+ /// Like getSelfArgument() except it returns a nullptr if we do not have a
1426
+ /// selfparam.
1427
+ const SILArgument *maybeGetSelfArgument() const {
1428
+ if (!hasSelfParam())
1429
+ return nullptr;
1430
+ return getArguments().back();
1431
+ }
1432
+
1433
const SILArgument *getDynamicSelfMetadata() const {
1434
assert(hasDynamicSelfMetadata() && "This method can only be called if the "
1435
"SILFunction has a self-metadata parameter");
0 commit comments