llvm/mlir/test/lib/Conversion/FuncToLLVM/TestConvertFuncOp.cpp

//===- TestConvertFuncOp.cpp - Test LLVM Conversion of Func FuncOp --------===//
//
// 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 "TestDialect.h"

#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h"
#include "mlir/Conversion/LLVMCommon/ConversionTarget.h"
#include "mlir/Conversion/LLVMCommon/Pattern.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Pass/Pass.h"

usingnamespacemlir;

namespace {

/// Test helper Conversion Pattern to directly call `convertFuncOpToLLVMFuncOp`
/// to verify this utility function includes all functionalities of conversion
struct FuncOpConversion : public ConvertOpToLLVMPattern<func::FuncOp> {};

struct ReturnOpConversion : public ConvertOpToLLVMPattern<func::ReturnOp> {};

static std::optional<Type>
convertSimpleATypeToStruct(test::SimpleAType simpleTy) {}

struct TestConvertFuncOp
    : public PassWrapper<TestConvertFuncOp, OperationPass<ModuleOp>> {};

} // namespace

namespace mlir::test {
void registerConvertFuncOpPass() {}
} // namespace mlir::test