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:
Chris Lattner 2008-12-18 05:52:56 +00:00
parent 65ee1e6ff4
commit 31535f1f04

View File

@ -283,6 +283,10 @@ Function *CodeExtractor::constructFunction(const Values &inputs,
GlobalValue::InternalLinkage,
oldFunction->getName() + "_" +
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);
// Create an iterator to name all of the arguments we inserted.