swiftlang/swift

[SR-6264] Unify duplicated code in GlobalPropertyOpt::isVisibleExternally() and FunctionLivenessComputation::isVisibleExternally()

Offen

#48.814 geöffnet am 01.11.2017

 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Swift (10.719 Forks)batch import
IRGencompilergood first issueimprovement

Repository-Metriken

Stars
 (69.989 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 8T 17h) (510 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide