Hide the constructors of SILFunction/SILGlobalVariable

behind factory methods.

Swift SVN r11967
This commit is contained in:
John McCall
2014-01-07 00:22:15 +00:00
parent 90f3b554ee
commit bb63d2312b
11 changed files with 80 additions and 44 deletions

View File

@@ -17,6 +17,20 @@
using namespace swift;
SILFunction *SILFunction::create(SILModule &M, SILLinkage linkage,
StringRef name,
CanSILFunctionType loweredType,
Optional<SILLocation> loc,
IsBare_t isBareSILFunction,
IsTransparent_t isTrans,
SILFunction *insertBefore,
SILDebugScope *debugScope,
DeclContext *DC) {
return new (M) SILFunction(M, linkage, name, loweredType, loc,
isBareSILFunction, isTrans, insertBefore,
debugScope, DC);
}
SILFunction::SILFunction(SILModule &Module, SILLinkage Linkage,
StringRef Name, CanSILFunctionType LoweredType,
Optional<SILLocation> Loc,