Commits

Michael Gottesman committed 302632cefbf
Make SILFunction::create() private and change all direct uses of SILFunction::create() to instead use SILMod.getOrCreateFunction(). This centralizes the entrypoints for creating SILFunctions. Creating a SILFunction is intimately tied to a specific SILModule, so it makes sense to either centralize the creation on SILModule or SILFunction. Since a SILFunction is in a SILModule, it seems more natural to put it on SILModule. I purposely created a new override on SILMod that exactly matches the signature of SILFunction::create so that beyond the extra indirection through SILMod, this change should be NFC. We can refactor individual cases in later iterations of refactoring.