================
@@ -0,0 +1,78 @@
+//===- OffloadArch.cpp - list available GPUs ------------*- C++ 
-*---------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Basic/Version.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Path.h"
+
+using namespace llvm;
+
+static cl::opt<bool> Help("h", cl::desc("Alias for -help"), cl::Hidden);
+
+// Mark all our options with this category.
+static cl::OptionCategory OffloadArchCategory("amdgpu-arch options");
+
+cl::opt<bool> Verbose("verbose", cl::desc("Enable verbose output"),
+                      cl::init(false), cl::cat(OffloadArchCategory));
+
+cl::opt<bool> AMDGPU("amdgpu-only", cl::desc("Print only AMD GPUs"),
+                     cl::init(false), cl::cat(OffloadArchCategory));
+
+cl::opt<bool> NVPTX("nvptx-only", cl::desc("Print only NVIDIA GPUs"),
+                    cl::init(false), cl::cat(OffloadArchCategory));
----------------
arsenm wrote:
The way that will work is we will have 10 of these things, and be unable to 
rename the flag. Just start with it 

https://github.com/llvm/llvm-project/pull/134713
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to