@@ -1854,9 +1854,13 @@ class ApplyInstBase<Impl, Base, false> : public Base {
1854
1854
1855
1855
// / Return the referenced function if the callee is a function_ref like
1856
1856
// / instruction.
1857
+ // /
1857
1858
// / WARNING: This not necessarily the function that will be called at runtime.
1858
- // / If this is a (prev_)dynamic_function_ref the actuall function called might
1859
- // / be different.
1859
+ // / If the callee is a (prev_)dynamic_function_ref the actual function called
1860
+ // / might be different because it could be dynamically replaced at runtime.
1861
+ // /
1862
+ // / If the client of this API wants to look at the content of the returned SIL
1863
+ // / function it should call getReferencedFunctionOrNull() instead.
1860
1864
SILFunction *getInitiallyReferencedFunction () const {
1861
1865
if (auto *FRI = dyn_cast<FunctionRefBaseInst>(getCallee ()))
1862
1866
return FRI->getInitiallyReferencedFunction ();
@@ -2319,10 +2323,14 @@ class FunctionRefBaseInst : public LiteralInst {
2319
2323
return nullptr ;
2320
2324
}
2321
2325
2322
- // / Return the referenced function.
2326
+ // / Return the initially referenced function.
2327
+ // /
2323
2328
// / WARNING: This not necessarily the function that will be called at runtime.
2324
- // / If this is a (prev_)dynamic_function_ref the actuall function called might
2325
- // / be different.
2329
+ // / If the callee is a (prev_)dynamic_function_ref the actual function called
2330
+ // / might be different because it could be dynamically replaced at runtime.
2331
+ // /
2332
+ // / If the client of this API wants to look at the content of the returned SIL
2333
+ // / function it should call getReferencedFunctionOrNull() instead.
2326
2334
SILFunction *getInitiallyReferencedFunction () const { return f; }
2327
2335
2328
2336
void dropReferencedFunction ();
0 commit comments