diff options
author | Dan Gohman <gohman@apple.com> | 2009-11-23 18:12:11 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-11-23 18:12:11 +0000 |
commit | 9d72cbf2d530725074685325694484633c774dc2 (patch) | |
tree | f0bd3c23fe02c89fa2f378cd1d51dafda1a9550a /llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | |
parent | 02d6aca867839102084f7e3a9f21485fef901fb0 (diff) | |
download | bcm5719-llvm-9d72cbf2d530725074685325694484633c774dc2.tar.gz bcm5719-llvm-9d72cbf2d530725074685325694484633c774dc2.zip |
Move CopyCatchInfo into FunctionLoweringInfo.cpp too, for consistency.
llvm-svn: 89683
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index 29eea82562b..e3b25c2a85c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -18,6 +18,7 @@ #include "llvm/DerivedTypes.h" #include "llvm/Function.h" #include "llvm/Instructions.h" +#include "llvm/IntrinsicInst.h" #include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/CodeGen/MachineFunction.h" @@ -340,4 +341,15 @@ void llvm::AddCatchInfo(CallInst &I, MachineModuleInfo *MMI, } } - +void llvm::CopyCatchInfo(BasicBlock *SrcBB, BasicBlock *DestBB, + MachineModuleInfo *MMI, FunctionLoweringInfo &FLI) { + for (BasicBlock::iterator I = SrcBB->begin(), E = --SrcBB->end(); I != E; ++I) + if (EHSelectorInst *EHSel = dyn_cast<EHSelectorInst>(I)) { + // Apply the catch info to DestBB. + AddCatchInfo(*EHSel, MMI, FLI.MBBMap[DestBB]); +#ifndef NDEBUG + if (!FLI.MBBMap[SrcBB]->isLandingPad()) + FLI.CatchInfoFound.insert(EHSel); +#endif + } +} |