[OPENMP] Use targetDiag for diagnostics of unsupported exceptions, NFC.

llvm-svn: 354509
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index b8431ce..fe1676a 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -752,10 +752,7 @@
   if (!getLangOpts().CXXExceptions &&
       !getSourceManager().isInSystemHeader(OpLoc)) {
     // Delay error emission for the OpenMP device code.
-    if (LangOpts.OpenMP && LangOpts.OpenMPIsDevice)
-      diagIfOpenMPDeviceCode(OpLoc, diag::err_exceptions_disabled) << "throw";
-    else
-      Diag(OpLoc, diag::err_exceptions_disabled) << "throw";
+    targetDiag(OpLoc, diag::err_exceptions_disabled) << "throw";
   }
 
   // Exceptions aren't allowed in CUDA device code.