We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e51a50 commit b38cc9cCopy full SHA for b38cc9c
llvm/tools/bugpoint/Miscompilation.cpp
@@ -268,6 +268,17 @@ static bool ExtractLoops(BugDriver &BD,
268
exit(1);
269
}
270
delete ToOptimizeLoopExtracted;
271
+
272
+ // All of the Function*'s in the MiscompiledFunctions list are in the old
273
+ // module. Make sure to update them to point to the corresponding functions
274
+ // in the new module.
275
+ for (unsigned i = 0, e = MiscompiledFunctions.size(); i != e; ++i) {
276
+ Function *OldF = MiscompiledFunctions[i];
277
+ Function *NewF =
278
+ ToNotOptimize->getFunction(OldF->getName(), OldF->getFunctionType());
279
+ MiscompiledFunctions[i] = NewF;
280
+ }
281
282
BD.setNewProgram(ToNotOptimize);
283
MadeChange = true;
284
0 commit comments