[lldb] [libc] [llvm] [clang-tools-extra] [lld] [clang] [flang] [libcxx] [OpenACC] Initial commits to support OpenACC (PR #70234)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 13 09:01:54 PST 2023


================
@@ -3633,6 +3633,22 @@ static void RenderHLSLOptions(const ArgList &Args, ArgStringList &CmdArgs,
     CmdArgs.push_back("-finclude-default-header");
 }
 
+static void RenderOpenACCOptions(const Driver &D, const ArgList &Args,
+                                 ArgStringList &CmdArgs, types::ID InputType) {
+  if (!Args.hasArg(options::OPT_fopenacc))
+    return;
+
+  CmdArgs.push_back("-fopenacc");
+
+  if (Arg *A = Args.getLastArg(options::OPT_openacc_macro_override)) {
+    StringRef Value = A->getValue();
+    if (llvm::find_if_not(Value, isdigit) == Value.end())
+      A->renderAsInput(Args, CmdArgs);
+    else
+      D.Diag(diag::err_drv_clang_unsupported) << Value;
----------------
erichkeane wrote:

Done!  `getAsInteger` returns `false` on success, so I inverted the condition (patch coming).

https://github.com/llvm/llvm-project/pull/70234


More information about the cfe-commits mailing list