CodeGen: indicate to the backend the exception model

Thread through -fsjlj-exceptions to the backend via the TargetOptions.  This is
in preparation for supporting SjLj exceptions on x86 (e.g. for MinGW).

llvm-svn: 270528
This commit is contained in:
Saleem Abdulrasool 2016-05-24 03:21:01 +00:00
parent afa35a2a37
commit 09d305fb6c
1 changed files with 3 additions and 0 deletions

View File

@ -591,6 +591,9 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
.Case("gnu", llvm::EABI::GNU)
.Default(llvm::EABI::Default);
if (LangOpts.SjLjExceptions)
Options.ExceptionModel = llvm::ExceptionHandling::SjLj;
Options.LessPreciseFPMADOption = CodeGenOpts.LessPreciseFPMAD;
Options.NoInfsFPMath = CodeGenOpts.NoInfsFPMath;
Options.NoNaNsFPMath = CodeGenOpts.NoNaNsFPMath;