[SIL] Add flag to SILFunction to indicate async.

Includes boilerplate to parse and print as well as to serialize and
deserialize.
This commit is contained in:
Nate Chandler
2020-08-03 17:28:34 -07:00
parent b647245fb8
commit 6b28c2fe89
12 changed files with 82 additions and 24 deletions

View File

@@ -217,6 +217,10 @@ SILFunction *SILFunctionBuilder::getOrCreateFunction(
}
addFunctionAttributes(F, decl->getAttrs(), mod, getOrCreateDeclaration,
constant);
if (auto *funcDecl = dyn_cast<AbstractFunctionDecl>(decl)) {
F->setAsync(funcDecl->hasAsync());
}
}
return F;