Add IRGen support for error results from functions.

As part of this, re-arrange the argument order so that
generic arguments come before the context, which comes
before the error result.  Be more consistent about always
adding a context parameter on thick functions, even
when it's unused.  Pull out the witness-method Self
argument so that it appears last after the error
argument.

Swift SVN r26667
This commit is contained in:
John McCall
2015-03-28 02:00:17 +00:00
parent e2396c3841
commit dc5a03a7bc
23 changed files with 684 additions and 394 deletions

View File

@@ -35,7 +35,7 @@ IRGenFunction::IRGenFunction(IRGenModule &IGM,
SILDebugScope *DbgScope,
Optional<SILLocation> DbgLoc)
: IGM(IGM), Builder(IGM.getLLVMContext()),
CurFn(Fn), ContextPtr(nullptr), DbgScope(DbgScope)
CurFn(Fn), DbgScope(DbgScope)
{
// Make sure the instructions in this function are attached its debug scope.