Start the implementation of a "nocapture" attribute, which is only valid on paramdecls.

This is part of rdar://16323038.  Because this hasn't been fully design reviewed and
implemented, I'm naming it as __nocapture for now.  It is blocking finishing off the
"improved let model" work.




Swift SVN r24079
This commit is contained in:
Chris Lattner
2014-12-22 21:34:30 +00:00
parent b9c3e9f55a
commit e349ee3a60
13 changed files with 119 additions and 32 deletions

View File

@@ -2988,16 +2988,14 @@ Type ModuleFile::getType(TypeID TID) {
TypeID inputID;
TypeID resultID;
uint8_t rawCallingConvention;
bool autoClosure;
bool thin;
bool noreturn;
bool blockCompatible;
bool autoClosure, thin, noreturn, blockCompatible, nocapture;
decls_block::FunctionTypeLayout::readRecord(scratch, inputID, resultID,
rawCallingConvention,
autoClosure, thin,
noreturn,
blockCompatible);
blockCompatible,
nocapture);
auto callingConvention = getActualCC(rawCallingConvention);
if (!callingConvention.hasValue()) {
error();
@@ -3006,8 +3004,7 @@ Type ModuleFile::getType(TypeID TID) {
auto Info = FunctionType::ExtInfo(callingConvention.getValue(),
getFunctionRepresentation(thin, blockCompatible),
noreturn,
autoClosure);
noreturn, autoClosure, nocapture);
typeOrOffset = FunctionType::get(getType(inputID), getType(resultID),
Info);