[clang] [Clang][CodeGen][CIR][NFC] Refactor CGCXXABI classes for code sharing (PR #165078)
Bruno Cardoso Lopes via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 27 11:13:14 PDT 2025
================
@@ -0,0 +1,99 @@
+//===----- CXXABIShared.h - Shared C++ ABI Base Class -----------*- 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
+//
+//===----------------------------------------------------------------------===//
+//
+// This file provides a base class for C++ ABI functionality that can be shared
+// between LLVM IR codegen and CIR codegen.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_CODEGENSHARED_CXXABISHARED_H
+#define LLVM_CLANG_CODEGENSHARED_CXXABISHARED_H
+
+#include "clang/AST/DeclCXX.h"
+#include "clang/AST/GlobalDecl.h"
+#include "clang/AST/Mangle.h"
+#include "clang/Basic/ABI.h"
+
+namespace clang {
+class ASTContext;
+
+/// Implements C++ ABI functionality that can be shared between LLVM IR codegen
+/// and CIR codegen.
+class CXXABIShared {
----------------
bcardosolopes wrote:
Nit: how about 'CXXABICommon' (or maybe just 'CXXABIBase')? IMO "Shared" might give extra room for interpretation given other idiomatic c++ stuff (e.g. shared pointers, etc)
https://github.com/llvm/llvm-project/pull/165078
More information about the cfe-commits
mailing list