[ABI/Metadata] Add @autoclosure to function parameter flags

Add `@autoclosure` to parameter flags associated with
function type metadata, which makes it possible to correctly
round-trip mangled name <-> metadata of function types which
have parameters marked as `@autoclosure`.

Resolves: rdar://problem/45489901
This commit is contained in:
Pavel Yaskevich
2018-10-24 00:24:04 -07:00
parent f85d8ae216
commit 621b970b53
7 changed files with 57 additions and 6 deletions

View File

@@ -365,7 +365,8 @@ public:
auto ownership = flags.getValueOwnership();
auto parameterFlags = ParameterTypeFlags()
.withValueOwnership(ownership)
.withVariadic(flags.isVariadic());
.withVariadic(flags.isVariadic())
.withAutoClosure(flags.isAutoClosure());
funcParams.push_back(AnyFunctionType::Param(type, label, parameterFlags));
}