summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2016-05-31 01:48:07 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2016-05-31 01:48:07 +0000
commitd2f705ddf942467911b2038d64bc04c7fddfdcdd (patch)
tree8c95f986123b640124472491c3fc06c54cbf34a1 /llvm/lib/CodeGen/LLVMTargetMachine.cpp
parent8df24c3cfd12b25415169ea8ae69ba8d64a2254f (diff)
downloadbcm5719-llvm-d2f705ddf942467911b2038d64bc04c7fddfdcdd.tar.gz
bcm5719-llvm-d2f705ddf942467911b2038d64bc04c7fddfdcdd.zip
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
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp3
1 files changed, 3 insertions, 0 deletions
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;
}
OpenPOWER on IntegriCloud