Revert unintended commmit.
authorDale Johannesen <dalej@apple.com>
Wed, 4 Mar 2009 02:09:48 +0000 (02:09 +0000)
committerDale Johannesen <dalej@apple.com>
Wed, 4 Mar 2009 02:09:48 +0000 (02:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66001 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/InlineFunction.cpp

index 9cd38cc55e0fb4b5aac198ccf17dc1b4702619cc..a96c7ceaa8edb9edf254b4f089b808e8fd17f46e 100644 (file)
@@ -235,7 +235,7 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD) {
   // function.
   std::vector<ReturnInst*> Returns;
   ClonedCodeInfo InlinedFunctionInfo;
-  Function::iterator FirstNewBlock, LastNewBlock;
+  Function::iterator FirstNewBlock;
 
   { // Scope to destroy ValueMap after cloning.
     DenseMap<const Value*, Value*> ValueMap;
@@ -312,7 +312,6 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD) {
 
     // Remember the first block that is newly cloned over.
     FirstNewBlock = LastBlock; ++FirstNewBlock;
-    LastNewBlock = &Caller->back();
 
     // Update the callgraph if requested.
     if (CG)
@@ -538,9 +537,7 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD) {
     // Add a branch to the merge points and remove return instructions.
     for (unsigned i = 0, e = Returns.size(); i != e; ++i) {
       ReturnInst *RI = Returns[i];
-      // A return in the last block in the function falls through.
-//      if (isa<InvokeInst>(TheCall) || RI->getParent() != LastNewBlock)
-        BranchInst::Create(AfterCallBB, RI);
+      BranchInst::Create(AfterCallBB, RI);
       RI->eraseFromParent();
     }
   } else if (!Returns.empty()) {