swiftlang/swift
[SR-6264] Unify duplicated code in GlobalPropertyOpt::isVisibleExternally() and FunctionLivenessComputation::isVisibleExternally()
开放
#48,814 创建于 2017年11月1日
IRGencompilergood first issueimprovement
仓库指标
- 星标
- (69,989 个星标)
- PR 合并指标
- (平均合并 8天 17小时) (30 天内合并 510 个 PR)
描述
| Previous ID | SR-6264 |
| Radar | None |
| Original Reporter | @gparker42 |
| Type | Improvement |
| 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.