Commit Graph

3 Commits

Author SHA1 Message Date
Slava Pestov
8fe8b89b0f SIL: Terminology change: [fragile] => [serialized]
Also, add a third [serializable] state for functions whose bodies we
*can* serialize, but only do so if they're referenced from another
serialized function.

This will be used for bodies synthesized for imported definitions,
such as init(rawValue:), etc, and various thunks, but for now this
change is NFC.
2017-03-29 16:47:28 -07:00
Doug Gregor
823c24b355 [SE-0112] Rename ErrorProtocol to Error.
This is bullet (5) of the proposed solution in SE-0112, and the last
major piece to be implemented.
2016-07-12 10:53:52 -07:00
practicalswift
87008f24ad [SIL] Add test case for crash triggered in swift::Parser::parseSILGlobal()
Stack trace:

```
<stdin>:3:36: error: expected ']' or ',' in attribute list
sil_global@_a:$()sil_global[fragile@_a:$(
                                   ^
<stdin>:3:42: error: expected type
sil_global@_a:$()sil_global[fragile@_a:$(
                                         ^
<stdin>:3:42: error: expected ',' separator
sil_global@_a:$()sil_global[fragile@_a:$(
                                         ^
                                         ,
sil-opt: /path/to/swift/lib/SIL/SILGlobalVariable.cpp:29: static swift::SILGlobalVariable *swift::SILGlobalVariable::create(swift::SILModule &, swift::SILLinkage, bool, llvm::StringRef, swift::SILType, Optional<swift::SILLocation>, swift::VarDecl *): Assertion `!entry->getValue() && "global variable already exists"' failed.
9  sil-opt         0x0000000000a25f6c swift::Parser::parseSILGlobal() + 684
10 sil-opt         0x00000000009f5c3b swift::Parser::parseTopLevel() + 731
11 sil-opt         0x00000000009f0f7f swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
12 sil-opt         0x00000000007392a6 swift::CompilerInstance::performSema() + 2918
13 sil-opt         0x0000000000723efc main + 1916
Stack dump:
0.	Program arguments: sil-opt -enable-sil-verify-all
1.	With parser at source location: <stdin>:3:42
```
2015-12-20 22:08:36 +01:00