Commit Graph

4289 Commits

Author SHA1 Message Date
Slava Pestov
8b73de60a9 IRGen: Remove GenericTypeRequirements::ParentType
Finally, remove the parent type metadata argument from type
constructors.

Now that type constructors don't take a parent metadata pointer,
we can hit some asserts concerning type constructors that do not
have any parameters. This happens when you define a concrete type
in a fully-constrained extension of a generic type.

A more efficient ABI would use concrete type metadata for these
cases, but that would be a bigger change that we can do later, so
for now just relax these assertions.

This resolves a runtime crasher since a circular metadata case is
no longer circular. I renamed the crasher to reference the more
specific radar since the more general issue of circular metadata
is still unresolved.
2017-09-25 15:45:17 -07:00
Doug Gregor
8f5d8aa7f9 Revert "[GSB] Centralize, clean up, and cache nested type name lookup" 2017-09-25 13:43:10 -07:00
Lance Parker
07b9232235 Correctly handle big endian systems, updated the comment for va_arg usage 2017-09-25 12:38:18 -07:00
Doug Gregor
d417281ed9 Merge pull request #12097 from DougGregor/gsb-nested-type-lookup
[GSB] Centralize, clean up, and cache nested type name lookup
2017-09-25 12:32:16 -07:00
Doug Gregor
4b43cbe26b Resolve a fixed crasher 2017-09-25 10:12:27 -07:00
John McCall
ab3f77baf2 Make SILInstruction no longer a subclass of ValueBase and
introduce a common superclass, SILNode.

This is in preparation for allowing instructions to have multiple
results.  It is also a somewhat more elegant representation for
instructions that have zero results.  Instructions that are known
to have exactly one result inherit from a class, SingleValueInstruction,
that subclasses both ValueBase and SILInstruction.  Some care must be
taken when working with SILNode pointers and testing for equality;
please see the comment on SILNode for more information.

A number of SIL passes needed to be updated in order to handle this
new distinction between SIL values and SIL instructions.

Note that the SIL parser is now stricter about not trying to assign
a result value from an instruction (like 'return' or 'strong_retain')
that does not produce any.
2017-09-25 02:06:26 -04:00
Joe Shajrawi
00f44ce24a Revert "Create fewer generic signature builders" 2017-09-22 21:57:53 -07:00
Doug Gregor
eccdedaf97 Merge pull request #12062 from DougGregor/make-fewer-gsbs
Create fewer generic signature builders
2017-09-22 18:38:27 -07:00
Pavel Yaskevich
80e4a2226b [ConstraintGraph] Don't try to contract edge of parameter bindings with inout attribute
Currently edge related to the parameter bindings is contracted
without properly checking if newly created equivalence class has
the same inout & l-value requirements. This patch improves the
situation by disallowing contraction of the edges related to parameter
binding constraint where left-hand side has `inout` attribute set.

Such guarantees that parameter can get `inout` type assigned when
argument gets `l-value` type.

Resolves: rdar://problem/33429010
2017-09-22 17:23:12 -07:00
Doug Gregor
76a532b3af [GSB] Move a well-formed GenericSignatureBuilder to be the canonical builder.
Once we compute a generic signature from a generic signature builder,
all queries involving that generic signature will go through a separate
(canonicalized) builder, and the original builder can no longer be used.
The canonicalization process then creates a new, effectively identical
generic signature builder. How silly.

Once we’ve computed the signature of a generic signature builder, “register”
it with the ASTContext, allowing us to move the existing generic signature
builder into place as the canonical generic signature builder. The builder
requires minimal patching but is otherwise fully usable.

Thanks to Slava Pestov for the idea!
2017-09-22 17:11:05 -07:00
Lance Parker
9fa2cc8192 removed uneeded compiler flags 2017-09-22 11:08:54 -07:00
Lance Parker
6056ebede1 Add tests for Bool’s conformance to CVarArg 2017-09-22 09:53:47 -07:00
Pavel Yaskevich
3628e5de02 [TypeChecker] Make test-case for rdar://problem/20859567 slightly more complicated
Avoids occasional passes of the performance test which causes CI to fail.
2017-09-21 18:06:36 -07:00
practicalswift
44fb6752d2 [swiftc (57 vs. 5592)] Add crasher in swift::Parser::parseStmtForEach(...)
Add test case for crash triggered in `swift::Parser::parseStmtForEach(...)`.

Current number of unresolved compiler crashers: 57 (5592 resolved)

/cc @rintaro - just wanted to let you know that this crasher caused an assertion failure for the assertion `StartOfControl != Tok.getLoc()` added on 2017-08-01 by you in commit 546aeb23 :-)

Assertion failure in [`lib/Parse/ParseStmt.cpp (line 1839)`](6f0c787996/lib/Parse/ParseStmt.cpp (L1839)):

```
Assertion `StartOfControl != Tok.getLoc()' failed.

When executing: ParserResult<swift::Stmt> swift::Parser::parseStmtForEach(swift::LabeledStmtInfo)
```

Assertion context:

```c++
        skipSingle();
    }
    if (Tok.is(tok::code_complete))
      return makeParserCodeCompletionStatus();

    assert(StartOfControl != Tok.getLoc());
    SourceRange ControlRange(StartOfControl, PreviousLoc);
    Container = makeParserErrorResult(new (Context) ErrorExpr(ControlRange));
    diagnose(ForLoc, diag::c_style_for_stmt_removed)
      .highlight(ControlRange);
    Status = makeParserError();
```
Stack trace:

```
0 0x0000000003e86f24 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3e86f24)
1 0x0000000003e87266 SignalHandler(int) (/path/to/swift/bin/swift+0x3e87266)
2 0x00007f79f84f1390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00007f79f6a16428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007f79f6a1802a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
5 0x00007f79f6a0ebd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
6 0x00007f79f6a0ec82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x0000000001576d12 swift::Parser::parseStmtForEach(swift::LabeledStmtInfo) (/path/to/swift/bin/swift+0x1576d12)
8 0x000000000157021a swift::Parser::parseStmt() (/path/to/swift/bin/swift+0x157021a)
9 0x000000000156f3b9 swift::Parser::parseExprOrStmt(swift::ASTNode&) (/path/to/swift/bin/swift+0x156f3b9)
10 0x0000000001571301 swift::Parser::parseBraceItems(llvm::SmallVectorImpl<swift::ASTNode>&, swift::BraceItemListKind, swift::BraceItemListKind) (/path/to/swift/bin/swift+0x1571301)
11 0x00000000015568f8 swift::Parser::parseExprClosure() (/path/to/swift/bin/swift+0x15568f8)
12 0x000000000154d893 swift::Parser::parseExprPostfix(swift::Diag<>, bool) (/path/to/swift/bin/swift+0x154d893)
13 0x000000000154c677 swift::Parser::parseExprSequenceElement(swift::Diag<>, bool) (/path/to/swift/bin/swift+0x154c677)
14 0x000000000154b6d6 swift::Parser::parseExprSequence(swift::Diag<>, bool, bool) (/path/to/swift/bin/swift+0x154b6d6)
15 0x000000000154b5b2 swift::Parser::parseExprImpl(swift::Diag<>, bool) (/path/to/swift/bin/swift+0x154b5b2)
16 0x000000000156f519 swift::Parser::parseExprOrStmt(swift::ASTNode&) (/path/to/swift/bin/swift+0x156f519)
17 0x0000000001571108 swift::Parser::parseBraceItems(llvm::SmallVectorImpl<swift::ASTNode>&, swift::BraceItemListKind, swift::BraceItemListKind) (/path/to/swift/bin/swift+0x1571108)
18 0x0000000001525a6e swift::Parser::parseTopLevel() (/path/to/swift/bin/swift+0x1525a6e)
19 0x00000000010c8aa2 swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) (/path/to/swift/bin/swift+0x10c8aa2)
20 0x0000000001045213 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x1045213)
21 0x00000000004bd856 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bd856)
22 0x00000000004bc60e swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bc60e)
23 0x0000000000474c54 main (/path/to/swift/bin/swift+0x474c54)
24 0x00007f79f6a01830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
25 0x0000000000472509 _start (/path/to/swift/bin/swift+0x472509)
```
2017-09-21 22:22:10 +02:00
practicalswift
2c18e9a8ce [swiftc (56 vs. 5592)] Add crasher in swift::GenericSignatureBuilder::Constraint
Add test case for crash triggered in `swift::GenericSignatureBuilder::Constraint`.

Current number of unresolved compiler crashers: 56 (5592 resolved)

Assertion failure in `llvm/include/llvm/ADT/Optional.h (line 137)`:

```
Assertion `hasVal' failed.

When executing: T &llvm::Optional<swift::GenericSignatureBuilder::Constraint<swift::Type> >::operator*() & [T = swift::GenericSignatureBuilder::Constraint<swift::Type>]
```

Assertion context:

```c++
  explicit operator bool() const { return hasVal; }
  bool hasValue() const { return hasVal; }
  const T* operator->() const { return getPointer(); }
  T* operator->() { return getPointer(); }
  const T& operator*() const LLVM_LVALUE_FUNCTION { assert(hasVal); return *getPointer(); }
  T& operator*() LLVM_LVALUE_FUNCTION { assert(hasVal); return *getPointer(); }

  template <typename U>
  constexpr T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION {
    return hasValue() ? getValue() : std::forward<U>(value);
  }
```
Stack trace:

```
0 0x0000000003e86f24 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3e86f24)
1 0x0000000003e87266 SignalHandler(int) (/path/to/swift/bin/swift+0x3e87266)
2 0x00007f6c4e004390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00007f6c4c529428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007f6c4c52b02a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
5 0x00007f6c4c521bd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
6 0x00007f6c4c521c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x000000000168baa6 swift::GenericSignatureBuilder::Constraint<swift::Type> swift::GenericSignatureBuilder::checkConstraintList<swift::Type, swift::Type>(llvm::ArrayRef<swift::GenericTypeParamType*>, std::vector<swift::GenericSignatureBuilder::Constraint<swift::Type>, std::allocator<swift::GenericSignatureBuilder::Constraint<swift::Type> > >&, llvm::function_ref<bool (swift::GenericSignatureBuilder::Constraint<swift::Type> const&)>, llvm::function_ref<swift::GenericSignatureBuilder::ConstraintRelation (swift::GenericSignatureBuilder::Constraint<swift::Type> const&)>, llvm::Optional<swift::Diag<unsigned int, swift::Type, swift::Type, swift::Type> >, swift::Diag<swift::Type, swift::Type>, swift::Diag<unsigned int, swift::Type, swift::Type>, llvm::function_ref<swift::Type (swift::Type const&)>, bool) (/path/to/swift/bin/swift+0x168baa6)
8 0x000000000167c244 swift::GenericSignatureBuilder::checkConcreteTypeConstraints(llvm::ArrayRef<swift::GenericTypeParamType*>, swift::GenericSignatureBuilder::PotentialArchetype*) (/path/to/swift/bin/swift+0x167c244)
9 0x00000000016758c7 swift::GenericSignatureBuilder::finalize(swift::SourceLoc, llvm::ArrayRef<swift::GenericTypeParamType*>, bool) (/path/to/swift/bin/swift+0x16758c7)
10 0x000000000167deb3 swift::GenericSignatureBuilder::computeGenericSignature(swift::SourceLoc, bool) (/path/to/swift/bin/swift+0x167deb3)
11 0x000000000163a7e8 swift::ProtocolDecl::computeRequirementSignature() (/path/to/swift/bin/swift+0x163a7e8)
12 0x00000000012c3ae8 swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) (/path/to/swift/bin/swift+0x12c3ae8)
13 0x00000000012917a3 swift::TypeChecker::validateDecl(swift::ValueDecl*) (/path/to/swift/bin/swift+0x12917a3)
14 0x00000000012a2abf (anonymous namespace)::DeclChecker::visitProtocolDecl(swift::ProtocolDecl*) (/path/to/swift/bin/swift+0x12a2abf)
15 0x000000000128f948 (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x128f948)
16 0x000000000128f853 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) (/path/to/swift/bin/swift+0x128f853)
17 0x00000000013203b4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x13203b4)
18 0x0000000001045247 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x1045247)
19 0x00000000004bd856 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bd856)
20 0x00000000004bc60e swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bc60e)
21 0x0000000000474c54 main (/path/to/swift/bin/swift+0x474c54)
22 0x00007f6c4c514830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
23 0x0000000000472509 _start (/path/to/swift/bin/swift+0x472509)
```
2017-09-21 19:39:37 +02:00
practicalswift
f783584b38 [swiftc (55 vs. 5592)] Add crasher in swift::ValueDecl::getFormalAccessScope
Add test case for crash triggered in `swift::ValueDecl::getFormalAccessScope`.

Current number of unresolved compiler crashers: 55 (5592 resolved)

Stack trace:

```
0 0x0000000003e86f24 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3e86f24)
1 0x0000000003e87266 SignalHandler(int) (/path/to/swift/bin/swift+0x3e87266)
2 0x00007fa0c7650390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x0000000001632e9f swift::ValueDecl::getFormalAccessScope(swift::DeclContext const*, bool) const (/path/to/swift/bin/swift+0x1632e9f)
4 0x000000000128e99a (anonymous namespace)::DeclChecker::checkOverrides(swift::TypeChecker&, swift::ValueDecl*) (/path/to/swift/bin/swift+0x128e99a)
5 0x00000000012921dd swift::TypeChecker::validateDecl(swift::ValueDecl*) (/path/to/swift/bin/swift+0x12921dd)
6 0x00000000012a8ba0 (anonymous namespace)::DeclChecker::visitBoundVariable(swift::VarDecl*) (/path/to/swift/bin/swift+0x12a8ba0)
7 0x00000000016b443f swift::Pattern::forEachVariable(std::function<void (swift::VarDecl*)> const&) const (/path/to/swift/bin/swift+0x16b443f)
8 0x000000000128fb02 (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x128fb02)
9 0x00000000012a112b (anonymous namespace)::DeclChecker::visitExtensionDecl(swift::ExtensionDecl*) (/path/to/swift/bin/swift+0x12a112b)
10 0x000000000128f978 (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x128f978)
11 0x000000000128f853 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) (/path/to/swift/bin/swift+0x128f853)
12 0x00000000013203b4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x13203b4)
13 0x0000000001045247 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x1045247)
14 0x00000000004bd856 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bd856)
15 0x00000000004bc60e swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bc60e)
16 0x0000000000474c54 main (/path/to/swift/bin/swift+0x474c54)
17 0x00007fa0c5b60830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
18 0x0000000000472509 _start (/path/to/swift/bin/swift+0x472509)
```
2017-09-21 12:29:43 +02:00
practicalswift
3055545cd1 [swiftc (54 vs. 5592)] Add crasher in swift::TypeBase::getCanonicalType(...)
Add test case for crash triggered in `swift::TypeBase::getCanonicalType(...)`.

Current number of unresolved compiler crashers: 54 (5592 resolved)

Stack trace:

```
0 0x0000000003e86f24 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3e86f24)
1 0x0000000003e87266 SignalHandler(int) (/path/to/swift/bin/swift+0x3e87266)
2 0x00007f20209a0390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00000000016c77d4 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c77d4)
4 0x00000000012c67b1 swift::TypeChecker::lookupMemberType(swift::DeclContext*, swift::Type, swift::Identifier, swift::OptionSet<swift::NameLookupFlags, unsigned int>) (/path/to/swift/bin/swift+0x12c67b1)
5 0x00000000013123ce resolveIdentTypeComponent(swift::TypeChecker&, swift::DeclContext*, llvm::ArrayRef<swift::ComponentIdentTypeRepr*>, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) (/path/to/swift/bin/swift+0x13123ce)
6 0x0000000001311b2a swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) (/path/to/swift/bin/swift+0x1311b2a)
7 0x00000000013128f0 (anonymous namespace)::TypeResolver::resolveType(swift::TypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>) (/path/to/swift/bin/swift+0x13128f0)
8 0x0000000001313f3b (anonymous namespace)::TypeResolver::resolveType(swift::TypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>) (/path/to/swift/bin/swift+0x1313f3b)
9 0x00000000013127fc swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) (/path/to/swift/bin/swift+0x13127fc)
10 0x00000000013110dd swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) (/path/to/swift/bin/swift+0x13110dd)
11 0x0000000001292a25 validateTypealiasType(swift::TypeChecker&, swift::TypeAliasDecl*) (/path/to/swift/bin/swift+0x1292a25)
12 0x0000000001291895 swift::TypeChecker::validateDecl(swift::ValueDecl*) (/path/to/swift/bin/swift+0x1291895)
13 0x00000000012a2abf (anonymous namespace)::DeclChecker::visitProtocolDecl(swift::ProtocolDecl*) (/path/to/swift/bin/swift+0x12a2abf)
14 0x000000000128f948 (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x128f948)
15 0x000000000128f853 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) (/path/to/swift/bin/swift+0x128f853)
16 0x00000000013203b4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x13203b4)
17 0x0000000001045247 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x1045247)
18 0x00000000004bd856 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bd856)
19 0x00000000004bc60e swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bc60e)
20 0x0000000000474c54 main (/path/to/swift/bin/swift+0x474c54)
21 0x00007f201eeb0830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
22 0x0000000000472509 _start (/path/to/swift/bin/swift+0x472509)
```
2017-09-21 10:46:04 +02:00
swift-ci
ff29198439 Merge pull request #12035 from practicalswift/swiftc-28839-genericsig 2017-09-21 01:44:54 -07:00
Slava Pestov
3b54234c6e Add two new crasher test cases found with the code completion fuzzer 2017-09-20 23:41:57 -07:00
practicalswift
e7dd8c9650 [swiftc (53 vs. 5592)] Add crasher in swift::SubstitutionMap::lookupSubstitution
Add test case for crash triggered in `swift::SubstitutionMap::lookupSubstitution`.

Current number of unresolved compiler crashers: 53 (5592 resolved)

/cc @swiftix - just wanted to let you know that this crasher caused an assertion failure for the assertion `genericSig` added on 2017-05-01 by you in commit 0aff7c0c :-)

Assertion failure in [`lib/AST/SubstitutionMap.cpp (line 120)`](5490877692/lib/AST/SubstitutionMap.cpp (L120)):

```
Assertion `genericSig' failed.

When executing: swift::Type swift::SubstitutionMap::lookupSubstitution(CanSubstitutableType) const
```

Assertion context:

```c++
  // have.
  auto genericParam = cast<GenericTypeParamType>(type);
  auto mutableThis = const_cast<SubstitutionMap *>(this);
  auto replacementTypes = mutableThis->getReplacementTypes();
  auto genericSig = getGenericSignature();
  assert(genericSig);
  auto genericParams = genericSig->getGenericParams();
  auto replacementIndex =
    GenericParamKey(genericParam).findIndexIn(genericParams);

  // If this generic parameter isn't represented, we don't have a replacement
```
Stack trace:

```
0 0x0000000003e86f24 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3e86f24)
1 0x0000000003e87266 SignalHandler(int) (/path/to/swift/bin/swift+0x3e87266)
2 0x00007f81f4d05390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00007f81f322a428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007f81f322c02a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
5 0x00007f81f3222bd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
6 0x00007f81f3222c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x00000000016c3b02 swift::SubstitutionMap::lookupSubstitution(swift::CanTypeWrapper<swift::SubstitutableType>) const (/path/to/swift/bin/swift+0x16c3b02)
8 0x00000000016d5df9 llvm::Optional<swift::Type> llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>::callback_fn<substType(swift::Type, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions)::$_18>(long, swift::TypeBase*) (/path/to/swift/bin/swift+0x16d5df9)
9 0x00000000016d2336 swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/path/to/swift/bin/swift+0x16d2336)
10 0x00000000016d264d swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/path/to/swift/bin/swift+0x16d264d)
11 0x00000000016cd625 swift::Type::subst(swift::SubstitutionMap const&, swift::SubstOptions) const (/path/to/swift/bin/swift+0x16cd625)
12 0x00000000016d20ac swift::TypeBase::getTypeOfMember(swift::ModuleDecl*, swift::ValueDecl const*, swift::Type) (/path/to/swift/bin/swift+0x16d20ac)
13 0x0000000001669cec swift::GenericSignatureBuilder::PotentialArchetype::updateNestedTypeForConformance(llvm::PointerUnion<swift::AssociatedTypeDecl*, swift::TypeDecl*>, swift::ArchetypeResolutionKind) (/path/to/swift/bin/swift+0x1669cec)
14 0x00000000016690d3 swift::GenericSignatureBuilder::PotentialArchetype::getNestedArchetypeAnchor(swift::Identifier, swift::GenericSignatureBuilder&, swift::ArchetypeResolutionKind) (/path/to/swift/bin/swift+0x16690d3)
15 0x000000000166d8db swift::GenericSignatureBuilder::resolvePotentialArchetype(swift::Type, swift::ArchetypeResolutionKind) (/path/to/swift/bin/swift+0x166d8db)
16 0x000000000166da71 swift::GenericSignatureBuilder::resolve(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource) (/path/to/swift/bin/swift+0x166da71)
17 0x00000000016725c5 swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind) (/path/to/swift/bin/swift+0x16725c5)
18 0x0000000001687a53 swift::GenericSignatureBuilder::ConstraintResult llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>::callback_fn<swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*)::$_22>(long, swift::Type, swift::TypeRepr const*) (/path/to/swift/bin/swift+0x1687a53)
19 0x000000000167f682 std::_Function_handler<void (swift::Type, swift::TypeRepr const*), visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>)::$_56>::_M_invoke(std::_Any_data const&, swift::Type&&, swift::TypeRepr const*&&) (/path/to/swift/bin/swift+0x167f682)
20 0x000000000166e00e swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*) (/path/to/swift/bin/swift+0x166e00e)
21 0x000000000166e609 swift::GenericSignatureBuilder::expandConformanceRequirement(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::GenericSignatureBuilder::RequirementSource const*, bool) (/path/to/swift/bin/swift+0x166e609)
22 0x000000000167289a swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind) (/path/to/swift/bin/swift+0x167289a)
23 0x0000000001687a53 swift::GenericSignatureBuilder::ConstraintResult llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>::callback_fn<swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*)::$_22>(long, swift::Type, swift::TypeRepr const*) (/path/to/swift/bin/swift+0x1687a53)
24 0x000000000167f682 std::_Function_handler<void (swift::Type, swift::TypeRepr const*), visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>)::$_56>::_M_invoke(std::_Any_data const&, swift::Type&&, swift::TypeRepr const*&&) (/path/to/swift/bin/swift+0x167f682)
25 0x000000000166e00e swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*) (/path/to/swift/bin/swift+0x166e00e)
26 0x000000000166de3e swift::GenericSignatureBuilder::addGenericParameterRequirements(swift::GenericTypeParamDecl*) (/path/to/swift/bin/swift+0x166de3e)
27 0x00000000012bfdd2 swift::TypeChecker::checkGenericParamList(swift::GenericSignatureBuilder*, swift::GenericParamList*, swift::GenericSignature*, swift::GenericTypeResolver*) (/path/to/swift/bin/swift+0x12bfdd2)
28 0x00000000012c36f4 swift::TypeChecker::checkGenericEnvironment(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, bool, llvm::function_ref<void (swift::GenericSignatureBuilder&)>) (/path/to/swift/bin/swift+0x12c36f4)
29 0x00000000012c3b23 swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) (/path/to/swift/bin/swift+0x12c3b23)
30 0x0000000001291324 swift::TypeChecker::validateDecl(swift::ValueDecl*) (/path/to/swift/bin/swift+0x1291324)
31 0x00000000012a19cc (anonymous namespace)::DeclChecker::visitClassDecl(swift::ClassDecl*) (/path/to/swift/bin/swift+0x12a19cc)
32 0x000000000128fa3e (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x128fa3e)
33 0x00000000012a1adb (anonymous namespace)::DeclChecker::visitClassDecl(swift::ClassDecl*) (/path/to/swift/bin/swift+0x12a1adb)
34 0x000000000128fa3e (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x128fa3e)
35 0x000000000128f853 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) (/path/to/swift/bin/swift+0x128f853)
36 0x00000000013203b4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x13203b4)
37 0x0000000001045247 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x1045247)
38 0x00000000004bd856 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bd856)
39 0x00000000004bc60e swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bc60e)
40 0x0000000000474c54 main (/path/to/swift/bin/swift+0x474c54)
41 0x00007f81f3215830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
42 0x0000000000472509 _start (/path/to/swift/bin/swift+0x472509)
```
2017-09-21 06:38:44 +02:00
practicalswift
5ac61dcb10 [swiftc (52 vs. 5592)] Add crasher in swift::TypeBase::getCanonicalType(...)
Add test case for crash triggered in `swift::TypeBase::getCanonicalType(...)`.

Current number of unresolved compiler crashers: 52 (5592 resolved)

/cc @slavapestov - just wanted to let you know that this crasher caused an assertion failure for the assertion `gpDecl->getDepth() != GenericTypeParamDecl::InvalidDepth && "parameter hasn't been validated"` added on 2017-02-22 by you in commit fdb0a186 :-)

Assertion failure in [`lib/AST/Type.cpp (line 1086)`](c1139c0b0c/lib/AST/Type.cpp (L1086)):

```
Assertion `gpDecl->getDepth() != GenericTypeParamDecl::InvalidDepth && "parameter hasn't been validated"' failed.

When executing: swift::CanType swift::TypeBase::getCanonicalType()
```

Assertion context:

```c++

  case TypeKind::GenericTypeParam: {
    GenericTypeParamType *gp = cast<GenericTypeParamType>(this);
    auto gpDecl = gp->getDecl();
    assert(gpDecl->getDepth() != GenericTypeParamDecl::InvalidDepth &&
           "parameter hasn't been validated");
    Result = GenericTypeParamType::get(gpDecl->getDepth(), gpDecl->getIndex(),
                                       gpDecl->getASTContext());
    break;
  }

```
Stack trace:

```
0 0x0000000003e849d4 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3e849d4)
1 0x0000000003e84d16 SignalHandler(int) (/path/to/swift/bin/swift+0x3e84d16)
2 0x00007f6adc82e390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00007f6adad53428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007f6adad5502a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
5 0x00007f6adad4bbd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
6 0x00007f6adad4bc82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x00000000016c6c70 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c6c70)
8 0x00000000016c6eac swift::QuerySubstitutionMap::operator()(swift::SubstitutableType*) const (/path/to/swift/bin/swift+0x16c6eac)
9 0x00000000016d4519 llvm::Optional<swift::Type> llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>::callback_fn<substType(swift::Type, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions)::$_18>(long, swift::TypeBase*) (/path/to/swift/bin/swift+0x16d4519)
10 0x00000000016d0a56 swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/path/to/swift/bin/swift+0x16d0a56)
11 0x00000000016d0d6d swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/path/to/swift/bin/swift+0x16d0d6d)
12 0x00000000016cbd45 swift::Type::subst(swift::SubstitutionMap const&, swift::SubstOptions) const (/path/to/swift/bin/swift+0x16cbd45)
13 0x000000000166e75e swift::GenericSignatureBuilder::addRequirement(swift::Requirement const&, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::ModuleDecl*, swift::SubstitutionMap const*) (/path/to/swift/bin/swift+0x166e75e)
14 0x000000000166f67f swift::GenericSignatureBuilder::expandConformanceRequirement(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::GenericSignatureBuilder::RequirementSource const*, bool)::$_15::operator()(swift::TypeDecl*, swift::TypeDecl*) const (/path/to/swift/bin/swift+0x166f67f)
15 0x000000000166e04f swift::GenericSignatureBuilder::expandConformanceRequirement(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::GenericSignatureBuilder::RequirementSource const*, bool) (/path/to/swift/bin/swift+0x166e04f)
16 0x0000000001670fba swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind) (/path/to/swift/bin/swift+0x1670fba)
17 0x0000000001686173 swift::GenericSignatureBuilder::ConstraintResult llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>::callback_fn<swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*)::$_22>(long, swift::Type, swift::TypeRepr const*) (/path/to/swift/bin/swift+0x1686173)
18 0x000000000167dda2 std::_Function_handler<void (swift::Type, swift::TypeRepr const*), visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>)::$_56>::_M_invoke(std::_Any_data const&, swift::Type&&, swift::TypeRepr const*&&) (/path/to/swift/bin/swift+0x167dda2)
19 0x000000000166c72e swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*) (/path/to/swift/bin/swift+0x166c72e)
20 0x000000000166cd29 swift::GenericSignatureBuilder::expandConformanceRequirement(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::GenericSignatureBuilder::RequirementSource const*, bool) (/path/to/swift/bin/swift+0x166cd29)
21 0x0000000001670fba swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind) (/path/to/swift/bin/swift+0x1670fba)
22 0x0000000001686173 swift::GenericSignatureBuilder::ConstraintResult llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>::callback_fn<swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*)::$_22>(long, swift::Type, swift::TypeRepr const*) (/path/to/swift/bin/swift+0x1686173)
23 0x000000000167dda2 std::_Function_handler<void (swift::Type, swift::TypeRepr const*), visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>)::$_56>::_M_invoke(std::_Any_data const&, swift::Type&&, swift::TypeRepr const*&&) (/path/to/swift/bin/swift+0x167dda2)
24 0x000000000166c72e swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*) (/path/to/swift/bin/swift+0x166c72e)
25 0x000000000166ca45 swift::GenericSignatureBuilder::expandConformanceRequirement(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::GenericSignatureBuilder::RequirementSource const*, bool) (/path/to/swift/bin/swift+0x166ca45)
26 0x0000000001670fba swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind) (/path/to/swift/bin/swift+0x1670fba)
27 0x0000000001686173 swift::GenericSignatureBuilder::ConstraintResult llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>::callback_fn<swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*)::$_22>(long, swift::Type, swift::TypeRepr const*) (/path/to/swift/bin/swift+0x1686173)
28 0x000000000167dda2 std::_Function_handler<void (swift::Type, swift::TypeRepr const*), visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>)::$_56>::_M_invoke(std::_Any_data const&, swift::Type&&, swift::TypeRepr const*&&) (/path/to/swift/bin/swift+0x167dda2)
29 0x000000000166c72e swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*) (/path/to/swift/bin/swift+0x166c72e)
30 0x000000000166cd29 swift::GenericSignatureBuilder::expandConformanceRequirement(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::GenericSignatureBuilder::RequirementSource const*, bool) (/path/to/swift/bin/swift+0x166cd29)
31 0x0000000001670fba swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind) (/path/to/swift/bin/swift+0x1670fba)
32 0x000000000166e93b swift::GenericSignatureBuilder::addRequirement(swift::Requirement const&, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::ModuleDecl*, swift::SubstitutionMap const*) (/path/to/swift/bin/swift+0x166e93b)
33 0x0000000001638efc swift::ProtocolDecl::computeRequirementSignature() (/path/to/swift/bin/swift+0x1638efc)
34 0x00000000012c2a48 swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) (/path/to/swift/bin/swift+0x12c2a48)
35 0x0000000001290473 swift::TypeChecker::validateDecl(swift::ValueDecl*) (/path/to/swift/bin/swift+0x1290473)
36 0x00000000012a18cf (anonymous namespace)::DeclChecker::visitProtocolDecl(swift::ProtocolDecl*) (/path/to/swift/bin/swift+0x12a18cf)
37 0x000000000128e5b8 (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x128e5b8)
38 0x000000000128e4b3 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) (/path/to/swift/bin/swift+0x128e4b3)
39 0x000000000131efc4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x131efc4)
40 0x0000000001043dd7 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x1043dd7)
41 0x00000000004bd856 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bd856)
42 0x00000000004bc60e swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bc60e)
43 0x0000000000474c54 main (/path/to/swift/bin/swift+0x474c54)
44 0x00007f6adad3e830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
45 0x0000000000472509 _start (/path/to/swift/bin/swift+0x472509)
```
2017-09-21 00:13:44 +02:00
practicalswift
4c735effb0 [swiftc (51 vs. 5592)] Add crasher in swift::ProtocolType::canonicalizeProtocols
Add test case for crash triggered in `swift::ProtocolType::canonicalizeProtocols`.

Current number of unresolved compiler crashers: 51 (5592 resolved)

Stack trace:

```
0 0x0000000003e849d4 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3e849d4)
1 0x0000000003e84d16 SignalHandler(int) (/path/to/swift/bin/swift+0x3e84d16)
2 0x00007f8696c53390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00000000016c9cc4 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16c9cc4)
4 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
5 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
6 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
7 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
8 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
9 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
10 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
11 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
12 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
13 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
14 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
15 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
16 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
17 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
18 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
19 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
20 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
21 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
22 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
23 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
24 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
25 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
26 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
27 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
28 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
29 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
30 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
31 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
32 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
33 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
34 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
35 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
36 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
37 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
38 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
39 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
40 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
41 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
42 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
43 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
44 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
45 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
46 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
47 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
48 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
49 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
50 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
51 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
52 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
53 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
54 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
55 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
56 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
57 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
58 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
59 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
60 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
61 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
62 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
63 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
64 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
65 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
66 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
67 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
68 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
69 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
70 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
71 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
72 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
73 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
74 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
75 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
76 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
77 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
78 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
79 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
80 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
81 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
82 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
83 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
84 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
85 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
86 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
87 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
88 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
89 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
90 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
91 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
92 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
93 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
94 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
95 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
96 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
97 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
98 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
99 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
100 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
101 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
102 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
103 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
104 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
105 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
106 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
107 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
108 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
109 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
110 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
111 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
112 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
113 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
114 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
115 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
116 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
117 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
118 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
119 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
120 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
121 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
122 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
123 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
124 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
125 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
126 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
127 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
128 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
129 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
130 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
131 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
132 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
133 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
134 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
135 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
136 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
137 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
138 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
139 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
140 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
141 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
142 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
143 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
144 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
145 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
146 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
147 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
148 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
149 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
150 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
151 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
152 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
153 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
154 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
155 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
156 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
157 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
158 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
159 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
160 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
161 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
162 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
163 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
164 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
165 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
166 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
167 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
168 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
169 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
170 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
171 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
172 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
173 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
174 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
175 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
176 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
177 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
178 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
179 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
180 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
181 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
182 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
183 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
184 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
185 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
186 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
187 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
188 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
189 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
190 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
191 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
192 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
193 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
194 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
195 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
196 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
197 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
198 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
199 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
200 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
201 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
202 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
203 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
204 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
205 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
206 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
207 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
208 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
209 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
210 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
211 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
212 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
213 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
214 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
215 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
216 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
217 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
218 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
219 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
220 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
221 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
222 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
223 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
224 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
225 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
226 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
227 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
228 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
229 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
230 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
231 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
232 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
233 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
234 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
235 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
236 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
237 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
238 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
239 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
240 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
241 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
242 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
243 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
244 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
245 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
246 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
247 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
248 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
249 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
250 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
251 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
252 0x00000000016caa8a swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16caa8a)
253 0x00000000016c649c swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16c649c)
254 0x0000000001637765 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1637765)
255 0x00000000016ca0a0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ca0a0)
```
2017-09-20 22:05:58 +02:00
Lance Parker
276f49af84 Merge pull request #11982 from lancep/comprehensiveArrayTests
[stdlib] Comprehensive array tests
2017-09-20 13:01:59 -07:00
Lance Parker
bd055412d2 Make the reserve capacity test use GT/GE rather than testing for a speicific value 2017-09-20 11:23:42 -07:00
Slava Pestov
ddd0666e94 IDE: Fix mismatched ErrorType check
In one place we were calling hasError() and in another directly checking
for ErrorType; if we had a type containing an ErrorType as a structural
component, we would hit an assertion.
2017-09-19 23:08:37 -07:00
Slava Pestov
7ba0f1ac82 IDE: Fix crash when completing unbound generic type in type context 2017-09-19 23:08:37 -07:00
Slava Pestov
ab8677faab IDE: Always use the right DeclContext
We have a hack where we use the ParsedDecl as the DeclContext,
to handle completion during function signature parsing, which
happens before the FuncDecl has been created.

While fixing this properly would require a bigger change to the
parser and AST, for now we just check if the ParsedDecl is a
child context of CurDeclContext, and only use it then.
2017-09-19 23:08:37 -07:00
Lance Parker
a386f747ed Removed more occurrences of the incorrect comment 2017-09-19 16:26:36 -07:00
Lance Parker
135b9b0a33 Max's feedback 2017-09-19 16:17:05 -07:00
Slava Pestov
c28ade7077 Driver: Pass the new -sil-merge-partial-modules flag
Also pass flags to disable SIL optimization passes when merging
modules, since that's completely unnecessary.

An evolution test that used to fail with WMO disabled now passes
with this change.

FIxes <rdar://problem/18913977>.
2017-09-18 21:18:07 -07:00
Pavel Yaskevich
18aaab7b14 Merge pull request #11992 from xedin/mark_rdar17024694_as_fast
[TypeChecker] Mark test-case for rdar://problem/17024694 as "fast"
2017-09-18 19:44:34 -07:00
Pavel Yaskevich
f5d72f5eaa [TypeChecker] Mark test-case for rdar://problem/17024694 as "fast"
Changes related to literal binding application improved one of the
type-checker performance test-cases.
2017-09-18 17:27:00 -07:00
Lance Parker
acf94f94ec Add -Onone to all the _Debug tests 2017-09-18 12:56:52 -07:00
swift-ci
29e69e2d1b Merge pull request #11966 from xedin/prefer-literal-bindings-over-typevars 2017-09-18 12:04:36 -07:00
Lance Parker
f000afea11 Removed debug parameters from build line 2017-09-18 11:55:30 -07:00
Lance Parker
6ff5310260 Moved helpers to a new file 2017-09-18 11:51:59 -07:00
Lance Parker
b484f59202 Iterator tests 2017-09-18 11:51:59 -07:00
Lance Parker
b67f38d940 Killed all the warnings in the Array tests 2017-09-18 11:51:59 -07:00
Lance Parker
36cfba3bfc Array casting tests 2017-09-18 11:51:59 -07:00
Lance Parker
d7a17bcd1f More Array bridging tests 2017-09-18 11:51:59 -07:00
Lance Parker
87e6485a15 Add bridging tests like Dictionary's 2017-09-18 11:51:46 -07:00
Robert Widmann
74f02ad16b Merge pull request #11623 from CodaFi/fundef
[stdlib]Custom message for recursive Strideable witness
2017-09-16 11:02:09 -04:00
Pavel Yaskevich
7d80daf0ff [ConstraintSolver] When ranking bindings prefer type vars with literal bindings
Change the potential binding ranking logic to prefer type variables
which don't have other type variables related to them, but have literal
bindings, over the ones that do have other type variables.
2017-09-15 22:19:39 -07:00
Slava Pestov
94be90bea3 Revert "Driver: Pass the new -sil-merge-partial-modules flag"
This reverts commit 86d241b38e.
2017-09-15 18:37:54 -07:00
Robert Widmann
d0bc2a8611 Custom message for recursive Strideable witness
Strideable declares a default witness for Equatable and Comparable

extension Strideable {
  @_inlineable
  public static func < (x: Self, y: Self) -> Bool {
    return x.distance(to: y) > 0
  }

  @_inlineable
  public static func == (x: Self, y: Self) -> Bool {
    return x.distance(to: y) == 0
  }
}

This witness is implemented recursively because the expectation
is that Stride != Self.  However, it is possible to implement
SignedNumeric and Strideable together and inherit this conformance
which will cause undefined behavior - usually a crash.

Provide an overload when Stride == Self and crash with custom message
that mentions that Equatable and Comparable have to be implemented
in this case.

- It's better than nothing.
2017-09-15 12:31:09 -04:00
Slava Pestov
86d241b38e Driver: Pass the new -sil-merge-partial-modules flag
Also pass flags to disable SIL optimization passes when merging
modules, since that's completely unnecessary.

An evolution test that used to fail with WMO disabled now passes
with this change.

FIxes <rdar://problem/18913977>.
2017-09-15 00:24:52 -07:00
Slava Pestov
9c6cd08a9b IRGen: Fix lowering of alloc_ref for resilient classes
We were inlining the size and alignment, which was not correct.
This was the cause of a long-standing ASAN failure in some
library evolution tests.

Fixes <rdar://problem/24540778>.
2017-09-15 00:24:52 -07:00
Slava Pestov
7ea93d9ed0 Revert "Preserve SIL when merging modules" 2017-09-14 19:04:18 -07:00
Slava Pestov
ef583499a9 Driver: Pass the new -sil-merge-partial-modules flag
Also pass flags to disable SIL optimization passes when merging
modules, since that's completely unnecessary.

An evolution test that used to fail with WMO disabled now passes
with this change.

FIxes <rdar://problem/18913977>.
2017-09-14 15:54:06 -07:00
Doug Gregor
ca4c5253d0 [GSB] Don’t record invalid concrete types via parent conformances. 2017-09-14 09:16:13 -07:00