[llvm-branch-commits] [llvm-branch] r107649 - /llvm/branches/wendling/eh/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp

Bill Wendling isanbard at gmail.com
Tue Jul 6 04:12:05 PDT 2010


Author: void
Date: Tue Jul  6 06:12:05 2010
New Revision: 107649

URL: http://llvm.org/viewvc/llvm-project?rev=107649&view=rev
Log:
All but the "normal" successor of an invoke are landing pads.

Modified:
    llvm/branches/wendling/eh/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp

Modified: llvm/branches/wendling/eh/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/wendling/eh/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp?rev=107649&r1=107648&r2=107649&view=diff
==============================================================================
--- llvm/branches/wendling/eh/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp (original)
+++ llvm/branches/wendling/eh/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Tue Jul  6 06:12:05 2010
@@ -151,7 +151,8 @@
   // Mark landing pad blocks.
   for (BB = Fn->begin(); BB != EB; ++BB)
     if (const InvokeInst *Invoke = dyn_cast<InvokeInst>(BB->getTerminator()))
-      MBBMap[Invoke->getSuccessor(1)]->setIsLandingPad();
+      for (unsigned I = 1, E = Invoke->getNumSuccessors(); I < E; ++I)
+        MBBMap[Invoke->getSuccessor(I)]->setIsLandingPad();
 }
 
 /// clear - Clear out all the function-specific state. This returns this





More information about the llvm-branch-commits mailing list