Skip to content
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

IRGen: Don't try to bind witness tables for archetype protocol requirements that don't need them. #1245

wants to merge 1 commit into from
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

IRGen: Don't try to bind witness tables for archetype protocol requir…

…ements that don't need them.

Fixes rdar://problem/24568361.
  • Loading branch information...
jckarter committed Feb 9, 2016
commit 52204f37510e9fb82cf546dd117d054b6a49ce16
@@ -2158,6 +2158,9 @@ void WitnessTableBuilder::bindArchetypes(IRGenFunction &IGF,
// be stored in the private section of the witness table.
SmallVector<llvm::Value*, 4> archetypeWitnessTables;
for (auto protocol : archetype->getConformsTo()) {
if (!Lowering::TypeConverter::protocolRequiresWitnessTable(protocol))

llvm::Value *wtable;
if (auto fulfillment =
fulfillments.getWitnessTable(CanType(archetype), protocol)) {
@@ -0,0 +1,10 @@
// RUN: %target-swift-frontend -emit-ir -verify %s
public struct TestGeneratorCrashy <Key: AnyObject, Value: AnyObject> {
public mutating func next() -> (Key, Value)? {
return nil

extension TestGeneratorCrashy: GeneratorType {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.