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

[SR-12090] .sib files do not preserve import declarations #54526

Open
dan-zheng opened this issue Jan 27, 2020 · 1 comment
Open

[SR-12090] .sib files do not preserve import declarations #54526

dan-zheng opened this issue Jan 27, 2020 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself SILSerialization

Comments

@dan-zheng
Copy link
Collaborator

Previous ID SR-12090
Radar rdar://problem/58999143
Original Reporter @dan-zheng
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, SILSerialization
Assignee None
Priority Medium

md5: 0049e50c66c5de339f6ccd2a0fc269af

Issue Description:

Reproducer: consider any SIL file with import declarations, excluding the hardcoded modules Builtin, Swift, SwiftShims.

// foo.sil
sil_stage raw
import _Differentiation

Running sil-opt by itself preserves the import declaration:

$ sil-opt test.sil
sil_stage raw

import Builtin
import Swift
import SwiftShims

import _Differentiation

But generating a .sib file and deserializing it does not preserve the import declaration:

$ sil-opt -emit-sib test.sil -o test.sib
$ sil-opt -module-name main
sil_stage raw

import Builtin
import Swift
import SwiftShims

This is an issue for round-trip SIL deserialization tests that use import declarations, since the import declarations are not preserved.

@beccadax
Copy link
Contributor

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself SILSerialization
Projects
None yet
Development

No branches or pull requests

2 participants