[llvm] MCExpr-ify amd_kernel_code_t (PR #91587)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 07:23:48 PDT 2024


================
@@ -0,0 +1,59 @@
+//===--- AMDGPUMCKernelCodeT.h --------------------------------*- 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
+//
+//===----------------------------------------------------------------------===//
+//
+/// \file
+/// MC layer struct for amd_kernel_code_t, provides MCExpr functionality where
+/// required.
+///
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCKERNELCODET_H
+#define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCKERNELCODET_H
+
+#include "AMDKernelCodeT.h"
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/StringRef.h"
+
+namespace llvm {
+class MCAsmParser;
+class MCContext;
+class MCExpr;
+class MCStreamer;
+class MCSubtargetInfo;
+class raw_ostream;
+namespace AMDGPU {
+
+struct AMDGPUMCKernelCodeT {
+  AMDGPUMCKernelCodeT() = default;
+
+  amd_kernel_code_t KernelCode;
----------------
arsenm wrote:

I'd expect to just fully redefine everything and not include a separate reference to the C struct 

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


More information about the llvm-commits mailing list