diff options
author | Jim Grosbach <grosbach@apple.com> | 2009-08-17 16:41:22 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2009-08-17 16:41:22 +0000 |
commit | 8b818d7e98309125c6058c4ea72a7dc73b031db2 (patch) | |
tree | b1fdcb9eeb803162a4a2876f6ac49a5bb3f63ad7 /lib/CodeGen/LLVMTargetMachine.cpp | |
parent | 2a5e23b44ddf1efde1d98bd3379489d93a90d55a (diff) |
Move the sjlj exception handling conversions to a back-end pass where they
more properly belong. This allows removing the front-end conditionalized
SJLJ code, and cleans up the generated IR considerably. All of the
infrastructure code (calling _Unwind_SjLj_Register/Unregister, etc) is
added by the SjLjEHPrepare pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | lib/CodeGen/LLVMTargetMachine.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 182f9cfc82..911e9a13ef 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -241,8 +241,11 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, // handle. switch (getTargetAsmInfo()->getExceptionHandlingType()) { - // SjLj piggy-backs on dwarf for this bit case ExceptionHandling::SjLj: + // SjLj piggy-backs on dwarf for this bit. The cleanups done apply to both + PM.add(createDwarfEHPass(getTargetLowering(), OptLevel==CodeGenOpt::None)); + PM.add(createSjLjEHPass(getTargetLowering())); + break; case ExceptionHandling::Dwarf: PM.add(createDwarfEHPass(getTargetLowering(), OptLevel==CodeGenOpt::None)); break; |