mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 06:29:05 +00:00
Fix PR2929 by making bugpoint/code extract propagate the nothrow
bit from the original function to the cloned one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61194 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -283,6 +283,10 @@ Function *CodeExtractor::constructFunction(const Values &inputs,
|
|||||||
GlobalValue::InternalLinkage,
|
GlobalValue::InternalLinkage,
|
||||||
oldFunction->getName() + "_" +
|
oldFunction->getName() + "_" +
|
||||||
header->getName(), M);
|
header->getName(), M);
|
||||||
|
// If the old function is no-throw, so is the new one.
|
||||||
|
if (oldFunction->doesNotThrow())
|
||||||
|
newFunction->setDoesNotThrow(true);
|
||||||
|
|
||||||
newFunction->getBasicBlockList().push_back(newRootNode);
|
newFunction->getBasicBlockList().push_back(newRootNode);
|
||||||
|
|
||||||
// Create an iterator to name all of the arguments we inserted.
|
// Create an iterator to name all of the arguments we inserted.
|
||||||
|
Reference in New Issue
Block a user