[SIL] Extract ClassVisibility from SILFunction to SubclassScope in SILLinkage.

This commit is contained in:
Huon Wilson
2017-04-13 13:44:31 -07:00
parent 22c9e20a9d
commit b59f95418c
17 changed files with 124 additions and 116 deletions

View File

@@ -57,7 +57,7 @@ SILFunction *SILFunction::create(
CanSILFunctionType loweredType, GenericEnvironment *genericEnv,
Optional<SILLocation> loc, IsBare_t isBareSILFunction,
IsTransparent_t isTrans, IsSerialized_t isSerialized, IsThunk_t isThunk,
ClassVisibility_t classVisibility, Inline_t inlineStrategy, EffectsKind E,
SubclassScope classSubclassScope, Inline_t inlineStrategy, EffectsKind E,
SILFunction *insertBefore, const SILDebugScope *debugScope) {
// Get a StringMapEntry for the function. As a sop to error cases,
// allow the name to have an empty string.
@@ -68,10 +68,10 @@ SILFunction *SILFunction::create(
name = entry->getKey();
}
auto fn = new (M)
SILFunction(M, linkage, name, loweredType, genericEnv, loc,
isBareSILFunction, isTrans, isSerialized, isThunk,
classVisibility, inlineStrategy, E, insertBefore, debugScope);
auto fn = new (M) SILFunction(M, linkage, name, loweredType, genericEnv, loc,
isBareSILFunction, isTrans, isSerialized,
isThunk, classSubclassScope, inlineStrategy, E,
insertBefore, debugScope);
if (entry) entry->setValue(fn);
return fn;
@@ -82,14 +82,14 @@ SILFunction::SILFunction(SILModule &Module, SILLinkage Linkage, StringRef Name,
GenericEnvironment *genericEnv,
Optional<SILLocation> Loc, IsBare_t isBareSILFunction,
IsTransparent_t isTrans, IsSerialized_t isSerialized,
IsThunk_t isThunk, ClassVisibility_t classVisibility,
IsThunk_t isThunk, SubclassScope classSubclassScope,
Inline_t inlineStrategy, EffectsKind E,
SILFunction *InsertBefore,
const SILDebugScope *DebugScope)
: Module(Module), Name(Name), LoweredType(LoweredType),
GenericEnv(genericEnv), DebugScope(DebugScope), Bare(isBareSILFunction),
Transparent(isTrans), Serialized(isSerialized), Thunk(isThunk),
ClassVisibility(classVisibility), GlobalInitFlag(false),
ClassSubclassScope(unsigned(classSubclassScope)), GlobalInitFlag(false),
InlineStrategy(inlineStrategy), Linkage(unsigned(Linkage)),
KeepAsPublic(false), EffectsKindAttr(E) {