mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix wrong call graph update when deserializing a vtable.
The callback (which is used for creating CG nodes) was lost when deserializing the functions of a vtable. Fixes rdar://problem/21609902 Swift SVN r29838
This commit is contained in:
@@ -542,7 +542,8 @@ void SILModule::eraseFunction(SILFunction *F) {
|
||||
}
|
||||
}
|
||||
|
||||
SILVTable *SILModule::lookUpVTable(const ClassDecl *C) {
|
||||
SILVTable *SILModule::lookUpVTable(const ClassDecl *C,
|
||||
std::function<void(SILFunction *)> Callback) {
|
||||
if (!C)
|
||||
return nullptr;
|
||||
|
||||
@@ -554,7 +555,8 @@ SILVTable *SILModule::lookUpVTable(const ClassDecl *C) {
|
||||
// If that fails, try to deserialize it. If that fails, return nullptr.
|
||||
SILVTable *Vtbl = SILLinkerVisitor(*this, getSILLoader(),
|
||||
SILModule::LinkingMode::LinkAll,
|
||||
ExternalSource).processClassDecl(C);
|
||||
ExternalSource,
|
||||
Callback).processClassDecl(C);
|
||||
if (!Vtbl)
|
||||
return nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user