mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: Force Clang-imported protocol conformances to get deserialized when used.
Code may end up indirectly using a witness table for a Clang-imported type by inlining code that used the conformance from another module, in which case we need to ensure we have a local definition at hand in the inlining module so we can have something to link against independently. This needs to be fixed from both sides: - During serialization, serialize not only witness tables from the current module, but from Clang-imported modules too - During deserialization, when the SILLinker walks a loaded module, ensure that all shared conformances get deserialized, including those from ApplyInsts and inherited/associated type protocol requirements. Fixes rdar://problem/38687726.
This commit is contained in:
@@ -708,6 +708,11 @@ public:
|
||||
bool isDefaultAtomic() const {
|
||||
return ! getOptions().AssumeSingleThreaded;
|
||||
}
|
||||
|
||||
/// Returns true if SIL entities associated with declarations in the given
|
||||
/// declaration context ought to be serialized as part of this module.
|
||||
bool shouldSerializeEntitiesAssociatedWithDeclContext(const DeclContext *DC)
|
||||
const;
|
||||
};
|
||||
|
||||
inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const SILModule &M){
|
||||
|
||||
Reference in New Issue
Block a user