mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: always update the linkage of a function with the serialized linkage in the swiftmodule.
The cross-module-optimization can change the linkage of a function to public. Then the SILLinkage is "out of sync" with the linkage derived from the AST. We need to make sure to read the correct SILLinkage from the module file.
This commit is contained in:
@@ -526,6 +526,13 @@ public:
|
||||
/// succeeded, false otherwise.
|
||||
bool loadFunction(SILFunction *F);
|
||||
|
||||
/// Update the linkage of the SILFunction with the linkage of the serialized
|
||||
/// function.
|
||||
///
|
||||
/// The serialized SILLinkage can differ from the linkage derived from the
|
||||
/// AST, e.g. cross-module-optimization can change the SIL linkages.
|
||||
void updateFunctionLinkage(SILFunction *F);
|
||||
|
||||
/// Attempt to link the SILFunction. Returns true if linking succeeded, false
|
||||
/// otherwise.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user