================ @@ -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) ---------------- nikic wrote:
Just as a general note, in C++ ctors it's okay to use the same name for the ctor arg and the member. So something like `DL(DL)` works and is idiomatic. 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