From d2f705ddf942467911b2038d64bc04c7fddfdcdd Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 31 May 2016 01:48:07 +0000 Subject: X86: permit using SjLj EH on x86 targets as an option This adds support to the backed to actually support SjLj EH as an exception model. This is *NOT* the default model, and requires explicitly opting into it from the frontend. GCC supports this model and for MinGW can still be enabled via the `--using-sjlj-exceptions` options. Addresses PR27749! llvm-svn: 271244 --- llvm/lib/CodeGen/LLVMTargetMachine.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp') diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index 346555a3deb..b164cad7d14 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp @@ -75,6 +75,9 @@ void LLVMTargetMachine::initAsmInfo() { TmpAsmInfo->setRelaxELFRelocations(Options.RelaxELFRelocations); + if (Options.ExceptionModel != ExceptionHandling::None) + TmpAsmInfo->setExceptionsType(Options.ExceptionModel); + AsmInfo = TmpAsmInfo; } -- cgit v1.2.3