SIL: Rename long form of getOrCreateFunction() to createFunction(), NFC

This made call sites confusing to read because it doesn't actually
check if the function already exists.

Also fix some minor formatting issues. This came up while I was working
on a fix for a bug that turned out to not be a bug.
This commit is contained in:
Slava Pestov
2016-04-21 16:18:48 -07:00
parent f8fcd0ce11
commit 2e52338d7c
14 changed files with 50 additions and 51 deletions

View File

@@ -565,7 +565,7 @@ PromotedParamCloner::initCloned(SILFunction *Orig, IsFragile_t Fragile,
assert((Orig->isTransparent() || Orig->isBare() || Orig->getDebugScope())
&& "SILFunction missing DebugScope");
assert(!Orig->isGlobalInit() && "Global initializer cannot be cloned");
auto *Fn = M.getOrCreateFunction(
auto *Fn = M.createFunction(
SILLinkage::Shared, ClonedName, ClonedTy, Orig->getContextGenericParams(),
Orig->getLocation(), Orig->isBare(), IsNotTransparent, Fragile,
Orig->isThunk(), Orig->getClassVisibility(), Orig->getInlineStrategy(),