MLIR 22.0.0git
WasmImporter.h
Go to the documentation of this file.
1//===- WasmImporter.h - Helpers to create WebAssembly emitter ---*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines helpers to import WebAssembly code using the WebAssembly
10// dialect.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef MLIR_TARGET_WASM_WASMIMPORTER_H
15#define MLIR_TARGET_WASM_WASMIMPORTER_H
16
17#include "mlir/IR/BuiltinOps.h"
18#include "mlir/IR/MLIRContext.h"
19#include "mlir/IR/OwningOpRef.h"
20#include "llvm/Support/SourceMgr.h"
21
22namespace mlir::wasm {
23
24/// If `source` contains a valid Wasm binary file, this function returns a
25/// a ModuleOp containing the representation of the Wasm module encoded in
26/// the source file in the `wasmssa` dialect.
28 MLIRContext *context);
29} // namespace mlir::wasm
30
31#endif // MLIR_TARGET_WASM_WASMIMPORTER_H
MLIRContext is the top-level object for a collection of MLIR operations.
Definition MLIRContext.h:63
This class acts as an owning reference to an op, and will automatically destroy the held op on destru...
Definition OwningOpRef.h:29
OwningOpRef< ModuleOp > importWebAssemblyToModule(llvm::SourceMgr &source, MLIRContext *context)
If source contains a valid Wasm binary file, this function returns a a ModuleOp containing the repres...