[SIL] Refactor linkage computation

- Factor out the adding of 'external' for non-definitions
- Factor out computation of the linkage limit

Intended to be NFC.
This commit is contained in:
Hamish Knight
2022-09-27 11:13:19 +01:00
parent 8491f52d47
commit b51d82d04f
3 changed files with 219 additions and 142 deletions

View File

@@ -380,7 +380,10 @@ struct SILDeclRef {
bool isAlwaysInline() const;
/// True if the function has the @_backDeploy attribute.
bool isBackDeployed() const;
/// Return the expected linkage for a definition of this declaration.
SILLinkage getDefinitionLinkage() const;
/// Return the expected linkage of this declaration.
SILLinkage getLinkage(ForDefinition_t forDefinition) const;