diff options
Diffstat (limited to 'tools/lto/LTOCodeGenerator.cpp')
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index 598da7f..dacf483 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -394,9 +394,19 @@ bool LTOCodeGenerator::generateAssemblyCode(formatted_raw_ostream& out, Module* mergedModule = _linker.getModule(); - // If target supports exception handling then enable it now. - if ( _target->getTargetAsmInfo()->doesSupportExceptionHandling() ) - llvm::ExceptionHandling = true; + // If target supports exception handling then enable it now. + switch (_target->getTargetAsmInfo()->getExceptionHandlingType()) { + case ExceptionHandling::Dwarf: + llvm::DwarfExceptionHandling = true; + break; + case ExceptionHandling::SjLj: + llvm::SjLjExceptionHandling = true; + break; + case ExceptionHandling::None: + break; + default: + assert (0 && "Unknown exception handling model!"); + } // if options were requested, set them if ( !_codegenOptions.empty() ) |