SIL Linker: clear the [serialized] flag when deserializing a function into a module that's already had the serialized flag stripped out.

This commit is contained in:
Joe Shajrawi
2017-12-14 10:34:15 -08:00
parent 027057f5d6
commit b258e973e5

View File

@@ -311,6 +311,13 @@ bool SILLinkerVisitor::process() {
while (!Worklist.empty()) {
auto *Fn = Worklist.pop_back_val();
if (Fn->getModule().isSerialized()) {
// If the containing module has been serialized,
// Remove The Serialized state (if any)
// This allows for more optimizations
Fn->setSerialized(IsSerialized_t::IsNotSerialized);
}
DEBUG(llvm::dbgs() << "Process imports in function: "
<< Fn->getName() << "\n");