[SR-6264] Unify duplicated code in GlobalPropertyOpt::isVisibleExternally() and FunctionLivenessComputation::isVisibleExternally() #48814
Labels
compiler
The Swift compiler itself
good first issue
Good for newcomers
improvement
IRGen
LLVM IR generation
Additional Detail from JIRA
md5: 7fe2948a0ff34a9d22f375125e2fe476
Issue Description:
Functions
GlobalPropertyOpt::isVisibleExternally()
andFunctionLivenessComputation::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.The text was updated successfully, but these errors were encountered: