mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SIL] Infer isWholeModule() from associated context
Rather than maintain a separate bit, check if the associated decl context is for the ModuleDecl.
This commit is contained in:
@@ -93,12 +93,11 @@ class SILModule::SerializationCallback final
|
||||
};
|
||||
|
||||
SILModule::SILModule(ModuleDecl *SwiftModule, TypeConverter &TC,
|
||||
const SILOptions &Options, const DeclContext *associatedDC,
|
||||
bool wholeModule)
|
||||
const SILOptions &Options, const DeclContext *associatedDC)
|
||||
: TheSwiftModule(SwiftModule),
|
||||
AssociatedDeclContext(associatedDC),
|
||||
Stage(SILStage::Raw), wholeModule(wholeModule), Options(Options),
|
||||
serialized(false), SerializeSILAction(), Types(TC) {
|
||||
Stage(SILStage::Raw), Options(Options), serialized(false),
|
||||
SerializeSILAction(), Types(TC) {
|
||||
assert(AssociatedDeclContext);
|
||||
|
||||
// We always add the base SILModule serialization callback.
|
||||
@@ -125,10 +124,9 @@ SILModule::~SILModule() {
|
||||
}
|
||||
|
||||
std::unique_ptr<SILModule>
|
||||
SILModule::createEmptyModule(ModuleDecl *M, TypeConverter &TC, const SILOptions &Options,
|
||||
bool WholeModule) {
|
||||
return std::unique_ptr<SILModule>(
|
||||
new SILModule(M, TC, Options, M, WholeModule));
|
||||
SILModule::createEmptyModule(ModuleDecl *M, TypeConverter &TC,
|
||||
const SILOptions &Options) {
|
||||
return std::unique_ptr<SILModule>(new SILModule(M, TC, Options, M));
|
||||
}
|
||||
|
||||
ASTContext &SILModule::getASTContext() const {
|
||||
|
||||
Reference in New Issue
Block a user