Skip to content

Revert "Preserve SIL when merging modules" #11938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/AST/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,11 +663,13 @@ ModuleDecl::lookupConformance(Type type, ProtocolDecl *protocol) {
if (auto inherited = dyn_cast<InheritedProtocolConformance>(conformance)) {
// Dig out the conforming nominal type.
auto rootConformance = inherited->getRootNormalConformance();
auto conformingClass
auto conformingNominal
= rootConformance->getType()->getClassOrBoundGenericClass();

// Map up to our superclass's type.
auto superclassTy = type->getSuperclassForDecl(conformingClass);
Type superclassTy = type->getSuperclass();
while (superclassTy->getAnyNominal() != conformingNominal)
superclassTy = superclassTy->getSuperclass();

// Compute the conformance for the inherited type.
auto inheritedConformance = lookupConformance(superclassTy, protocol);
Expand Down
8 changes: 0 additions & 8 deletions lib/Driver/ToolChains.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,14 +687,6 @@ ToolChain::constructInvocation(const MergeModuleJobAction &job,
// serialized ASTs.
Arguments.push_back("-parse-as-library");

// Merge serialized SIL from partial modules.
Arguments.push_back("-sil-merge-partial-modules");

// Disable SIL optimization passes; we've already optimized the code in each
// partial mode.
Arguments.push_back("-disable-diagnostic-passes");
Arguments.push_back("-disable-sil-perf-optzns");

addCommonFrontendArgs(*this, context.OI, context.Output, context.Args,
Arguments);
context.Args.AddLastArg(Arguments, options::OPT_import_objc_header);
Expand Down
8 changes: 0 additions & 8 deletions test/multifile/imported-conformance/option-set/library.swift

This file was deleted.

15 changes: 0 additions & 15 deletions test/multifile/imported-conformance/option-set/main.swift

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// RUN: %target-resilience-test
// RUN: %target-resilience-test-wmo
// REQUIRES: executable_test

// FIXME: shouldn't need -whole-module-optimization here; we need to fix the
// frontend to merge serialized SIL functions from different translation units

import StdlibUnittest
import function_change_transparent_body

Expand Down