[clang] clang/Driver: Use struct type for BoundArch instead of StringRef (PR #204748)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 19 05:30:53 PDT 2026


================
@@ -0,0 +1,49 @@
+//===--- BoundArch.h - Bound Architecture struct ----------------*- 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_DRIVER_BOUNDARCH_H
+#define LLVM_CLANG_DRIVER_BOUNDARCH_H
+
+#include "clang/Basic/OffloadArch.h"
+#include "llvm/ADT/StringRef.h"
+
+namespace clang {
+namespace driver {
+
+/// Represents a bound architecture for offload / multiple architecture
+/// compilation.
+struct BoundArch {
----------------
jhuber6 wrote:

Think we could just merge this with the existing OffloadArch header? Is this basically just a `std::pair` of these to avoid converting between the string and enum values?

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


More information about the cfe-commits mailing list