summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-27 17:28:13 +0000
committerChris Lattner <sabre@nondot.org>2006-05-27 17:28:13 +0000
commit67c424e010a7d67306d5fe429838930865922282 (patch)
tree8eeadee6cc472076b1efef842ac19cf76abf7ecd /llvm/lib/Transforms
parent6b852931a071f1a916eaab94df7ebb223fa0e955 (diff)
downloadbcm5719-llvm-67c424e010a7d67306d5fe429838930865922282.tar.gz
bcm5719-llvm-67c424e010a7d67306d5fe429838930865922282.zip
Fix some regression from the inliner patch I committed last night. This fixes
ldecod, lencod, and SPASS. llvm-svn: 28523
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 623da058db9..dd1b31bde5a 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -311,7 +311,7 @@ void llvm::CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
for (; (PN = dyn_cast<PHINode>(I)); ++I) {
for (unsigned pred = 0, e = NumPreds; pred != e; ++pred) {
if (BasicBlock *MappedBlock =
- cast<BasicBlock>(ValueMap[PN->getIncomingBlock(pred)])) {
+ cast_or_null<BasicBlock>(ValueMap[PN->getIncomingBlock(pred)])) {
Value *InVal = MapValue(PN->getIncomingValue(pred), ValueMap);
assert(InVal && "Unknown input value?");
PN->setIncomingValue(pred, InVal);
OpenPOWER on IntegriCloud