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-6264] Unify duplicated code in GlobalPropertyOpt::isVisibleExternally() and FunctionLivenessComputation::isVisibleExternally() #48814

Open
gparker42 mannequin opened this issue Nov 1, 2017 · 4 comments
Labels
compiler The Swift compiler in itself good first issue Good for newcomers improvement IRGen LLVM IR generation

Comments

@gparker42
Copy link
Mannequin

gparker42 mannequin commented Nov 1, 2017

Previous ID SR-6264
Radar None
Original Reporter @gparker42
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, IRGen, StarterBug
Assignee None
Priority Medium

md5: 7fe2948a0ff34a9d22f375125e2fe476

Issue Description:

Functions GlobalPropertyOpt::isVisibleExternally() and FunctionLivenessComputation::isVisibleExternally() have duplicated code that checks whether a declaration may be externally used based on its access level. This duplication should be fixed.

Possible solution: add a function to class ValueDecl to do the work, and call it from both places.

@gparker42
Copy link
Mannequin Author

gparker42 mannequin commented Nov 1, 2017

isAssignableExternally() in LetPropertiesOpt.cpp is another duplication.

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 4, 2018

Comment by Dave Weston (JIRA)

ronaldsmartin (JIRA User), are you still working on this issue?

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 6, 2018

Comment by Dave Weston (JIRA)

In progress PR here: #13720

@belkadan
Copy link
Contributor

Resetting assignee for all Starter Bugs that haven't been modified since 2018. If someone wants to pick up dtweston (JIRA User)'s PR they're welcome to!

@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
compiler The Swift compiler in itself good first issue Good for newcomers improvement IRGen LLVM IR generation
Projects
None yet
Development

No branches or pull requests

2 participants