[llvm-commits] [llvm] r61194 - /llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
Chris Lattner
sabre at nondot.org
Wed Dec 17 21:52:59 PST 2008
Author: lattner
Date: Wed Dec 17 23:52:56 2008
New Revision: 61194
URL: http://llvm.org/viewvc/llvm-project?rev=61194&view=rev
Log:
Fix PR2929 by making bugpoint/code extract propagate the nothrow
bit from the original function to the cloned one.
Modified:
llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
Modified: llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp?rev=61194&r1=61193&r2=61194&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp Wed Dec 17 23:52:56 2008
@@ -283,6 +283,10 @@
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.
More information about the llvm-commits
mailing list