Summary:
This was flagged in https://www.viva64.com/en/b/0629/ under "Snippet No.
6".
Note that author also states:
"Note that the loop doesn't actually execute at all."
This is not true, but the author can be forgiven; there's two distinct
variables with very similar identifiers:
MiscompiledFunctions
MisCompFunctions
Reviewers: echristo, srhines, RKSimon
Reviewed By: RKSimon
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62113
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361279
91177308-0d34-0410-b5e6-
96231b3b80d8
if (Linker::linkModules(*ProgClone, std::move(Extracted)))
exit(1);
- // Set the new program and delete the old one.
- BD.setNewProgram(std::move(ProgClone));
-
// Update the list of miscompiled functions.
MiscompiledFunctions.clear();
MiscompiledFunctions.push_back(NewF);
}
+ // Set the new program and delete the old one.
+ BD.setNewProgram(std::move(ProgClone));
+
return true;
}