[llvm] [AMDGPU] Add AMDGPU specific variadic operation MCExprs (PR #82022)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 00:25:04 PST 2024


================
@@ -0,0 +1,94 @@
+//===- AMDGPUMCExpr.cpp - AMDGPU specific MC expression classes -----------===//
+//
+// 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 "AMDGPUMCExpr.h"
+#include "llvm/MC/MCContext.h"
+#include "llvm/MC/MCStreamer.h"
+#include "llvm/MC/MCSymbol.h"
+#include "llvm/MC/MCValue.h"
+#include "llvm/Support/Allocator.h"
+#include "llvm/Support/raw_ostream.h"
+#include <optional>
+
+using namespace llvm;
+
+const AMDGPUVariadicMCExpr *
+AMDGPUVariadicMCExpr::create(AMDGPUVariadicKind Kind,
+                             ArrayRef<const MCExpr *> Args, MCContext &Ctx) {
+  return new (Ctx) AMDGPUVariadicMCExpr(Kind, Args);
+}
+
+const MCExpr *AMDGPUVariadicMCExpr::GetSubExpr(size_t index) const {
----------------
Pierre-vh wrote:

CamelCase?

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


More information about the llvm-commits mailing list