mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user