Merge pull request #27571 from slavapestov/circular-validation-cleanups-5

Circular validation cleanups, part 5
This commit is contained in:
Slava Pestov
2019-10-10 19:52:56 -04:00
committed by GitHub
42 changed files with 476 additions and 475 deletions

View File

@@ -1376,10 +1376,11 @@ void LoadableStorageAllocation::insertIndirectReturnArgs() {
auto &ctx = pass.F->getModule().getASTContext();
auto var = new (ctx) ParamDecl(
ParamDecl::Specifier::InOut, SourceLoc(), SourceLoc(),
SourceLoc(), SourceLoc(),
ctx.getIdentifier("$return_value"), SourceLoc(),
ctx.getIdentifier("$return_value"),
pass.F->getDeclContext());
var->setSpecifier(ParamSpecifier::InOut);
pass.F->begin()->insertFunctionArgument(
0, newResultStorageType.getAddressType(), ValueOwnershipKind::Any, var);
}