Fold ExtInfo::isThin and ::isBlock into a "Representation" enum.

These bits are orthogonal to each other, so combine them into one, and diagnose attempts to produce a type that's both. Spot-fix a bunch of places this revealed by inspection that we would have crashed in SILGen or IRGen if blocks were be handled.

Swift SVN r16088
This commit is contained in:
Joe Groff
2014-04-09 00:37:26 +00:00
parent e9d2e122ee
commit 8adaab0233
35 changed files with 505 additions and 339 deletions

View File

@@ -911,10 +911,9 @@ static SILValue emitOptionalToRef(SILGenFunction &gen, SILLocation loc,
// %2 = builtin_function_ref "inttoptr_Word" : $@thin (Word) -> RawPointer
auto bfrInfo = SILFunctionType::ExtInfo(AbstractCC::Freestanding,
/*thin*/ true,
FunctionType::Representation::Thin,
/*noreturn*/ false,
/*autoclosure*/ false,
/*block*/ false);
/*autoclosure*/ false);
SILParameterInfo Param(WordTy.getSwiftRValueType(),
ParameterConvention::Direct_Unowned);
SILResultInfo Result(gen.getASTContext().TheRawPointerType,