summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2016-05-24 03:21:01 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2016-05-24 03:21:01 +0000
commit09d305fb6c5e7700986d9f2c5d69362279f772c8 (patch)
treed0d1ddd910f4ee0ebb91f9b04d80e3e3769cac12 /clang/lib/CodeGen
parentafa35a2a37b2c488142a723686031a22c032f8ad (diff)
downloadbcm5719-llvm-09d305fb6c5e7700986d9f2c5d69362279f772c8.tar.gz
bcm5719-llvm-09d305fb6c5e7700986d9f2c5d69362279f772c8.zip
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
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 2de897b51d1..e2bbedd500d 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -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;
OpenPOWER on IntegriCloud