File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -2061,11 +2061,15 @@ class AsyncCallEmission final : public CallEmission {
2061
2061
Size contextSize;
2062
2062
Address context;
2063
2063
llvm::Value *thickContext = nullptr ;
2064
+ Optional<AsyncContextLayout> asyncContextLayout;
2064
2065
2065
2066
AsyncContextLayout getAsyncContextLayout () {
2066
- return ::getAsyncContextLayout (IGF, getCallee ().getOrigFunctionType (),
2067
- getCallee ().getSubstFunctionType (),
2068
- getCallee ().getSubstitutions ());
2067
+ if (!asyncContextLayout) {
2068
+ asyncContextLayout.emplace (::getAsyncContextLayout (
2069
+ IGF, getCallee ().getOrigFunctionType (),
2070
+ getCallee ().getSubstFunctionType (), getCallee ().getSubstitutions ()));
2071
+ }
2072
+ return *asyncContextLayout;
2069
2073
}
2070
2074
2071
2075
void saveValue (ElementLayout layout, Explosion &explosion, bool isOutlined) {
You can’t perform that action at this time.
0 commit comments