================
@@ -0,0 +1,76 @@
+//===---- 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.
+/// This reverse mapper translates low-level ABI-specific types back into
+/// LLVM IR types suitable for code generation and optimization passes.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CODEGEN_ABITYPEMAPPER_H
+#define LLVM_CODEGEN_ABITYPEMAPPER_H
+
+#include "llvm/ABI/Types.h"
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/IR/DataLayout.h"
+#include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/Type.h"
+#include "llvm/Support/TypeSize.h"
+
+namespace llvm {
+
+class ABITypeMapper {
+public:
+  explicit ABITypeMapper(LLVMContext &Ctx, const DataLayout &DataLayout)
+      : Context(Ctx), DL(DataLayout) {}
+
+  Type *convertType(const abi::Type *ABIType);
+
+  void clearCache() { TypeCache.clear(); }
+
+private:
+  LLVMContext &Context;
+  const DataLayout &DL;
+
+  DenseMap<const abi::Type *, Type *> TypeCache;
+
+  Type *convertIntegerType(const abi::IntegerType *IT);
----------------
nikic wrote:

Does not exist?


https://github.com/llvm/llvm-project/pull/140112
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to