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 | 1ab34573197db6efd1eb07b95b836e46f1f88478 (patch) | |
tree | b6d6e21b55f9a2ce3ef17ca0cd09bbd9677bf9b5 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 150cb6d91af313b84f1876e8a1f016cfe1e1e6d5 (diff) | |
download | bcm5719-llvm-1ab34573197db6efd1eb07b95b836e46f1f88478.tar.gz bcm5719-llvm-1ab34573197db6efd1eb07b95b836e46f1f88478.zip |
[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.
llvm-svn: 331372
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index a6dc1678d1d..ddaa16477aa 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/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; |