[clang] [llvm] [clang] Integrate LLVMABI for function call ABI lowering (PR #194460)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 28 03:49:24 PDT 2026
================
@@ -0,0 +1,61 @@
+//===---- ABITypeMapper.h - Maps LLVM ABI Types to LLVM IR Types --------===//
+//
+// 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
+/// Maps LLVM ABI type representations back to corresponding LLVM IR types.
+/// Used by frontends after the ABI library has computed argument/return
+/// classification: coerce-to types in the ABI representation must be
+/// translated to llvm::Type before being handed back to the IR builder.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_ABI_ABITYPEMAPPER_H
+#define LLVM_ABI_ABITYPEMAPPER_H
+
+#include "llvm/ABI/Types.h"
+#include "llvm/ADT/DenseMap.h"
+
+namespace llvm {
+class LLVMContext;
+class Type;
+class StructType;
+class DataLayout;
+
+namespace abi {
+
+class ABITypeMapper {
----------------
nikic wrote:
As usual I'd avoid the `ABI` prefix as we're already in the namespace.
Maybe call this `IRTypeMapper` to emphasize that this is mapping to LLVM IR types?
https://github.com/llvm/llvm-project/pull/194460
More information about the cfe-commits
mailing list