Remove the redundant DeclCtx field in SILFunction.

In all cases the DeclCtx field was supposed to be initialized from the
SILLocation of the function, so we can save one pointer per
SILFunction.

There is one test case change where a different (more precise)
diagnostic is being generated after this change.
This commit is contained in:
Adrian Prantl
2017-02-06 10:11:07 -08:00
parent 076a64eb08
commit 4d1ae142c6
14 changed files with 78 additions and 108 deletions

View File

@@ -591,7 +591,6 @@ SILFunction *PromotedParamCloner::initCloned(SILFunction *Orig,
if (Orig->hasUnqualifiedOwnership()) {
Fn->setUnqualifiedOwnership();
}
Fn->setDeclCtx(Orig->getDeclContext());
return Fn;
}