diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-05-02 16:52:07 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-05-02 16:52:07 +0000 |
commit | 1d6233649c68bcf324b4fdf1b434486285dbf6b2 (patch) | |
tree | 253615832a8b2d77cc4773ecd9a42b17cca265e0 /lib/Frontend/CompilerInvocation.cpp | |
parent | 544011fe9779f8620115192eddbd33b07a6df5ac (diff) | |
download | clang-1d6233649c68bcf324b4fdf1b434486285dbf6b2.tar.gz |
[OPENMP] Enable c++ exceptions outside of the target constructs iff they are
enabled for the host.
If the compilation for the host enables C++ exceptions, but they are not
supported by the device, we still need to allow the code with the
exception handling constructs outside of the target regions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index a6dc1678d1..ddaa16477a 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -2586,6 +2586,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, // Set the flag to prevent the implementation from emitting device exception // handling code for those requiring so. + Opts.OpenMPHostCXXExceptions = Opts.Exceptions && Opts.CXXExceptions; if (Opts.OpenMPIsDevice && T.isNVPTX()) { Opts.Exceptions = 0; Opts.CXXExceptions = 0; |