mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
[Bugpoint] fix use-after-move. NFC
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 llvm-svn: 361279
This commit is contained in:
parent
419e5c2d36
commit
c92b96e8a9
@ -591,9 +591,6 @@ ExtractBlocks(BugDriver &BD,
|
||||
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();
|
||||
|
||||
@ -603,6 +600,9 @@ ExtractBlocks(BugDriver &BD,
|
||||
MiscompiledFunctions.push_back(NewF);
|
||||
}
|
||||
|
||||
// Set the new program and delete the old one.
|
||||
BD.setNewProgram(std::move(ProgClone));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user