MLIR  19.0.0git
MlirTranslateMain.h
Go to the documentation of this file.
1 //===- MlirTranslateMain.h - MLIR Translation Driver main -------*- 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 // Main entry function for mlir-translate for when built as standalone binary.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef MLIR_TOOLS_MLIRTRANSLATE_MLIRTRANSLATEMAIN_H
14 #define MLIR_TOOLS_MLIRTRANSLATE_MLIRTRANSLATEMAIN_H
15 
17 #include "llvm/ADT/StringRef.h"
18 
19 namespace mlir {
20 /// Translate to/from an MLIR module from/to an external representation (e.g.
21 /// LLVM IR, SPIRV binary, ...). This is the entry point for the implementation
22 /// of tools like `mlir-translate`. The translation to perform is parsed from
23 /// the command line. The `toolName` argument is used for the header displayed
24 /// by `--help`.
25 LogicalResult mlirTranslateMain(int argc, char **argv, StringRef toolName);
26 } // namespace mlir
27 
28 #endif // MLIR_TOOLS_MLIRTRANSLATE_MLIRTRANSLATEMAIN_H
Include the generated interface declarations.
LogicalResult mlirTranslateMain(int argc, char **argv, StringRef toolName)
Translate to/from an MLIR module from/to an external representation (e.g.
This class represents an efficient way to signal success or failure.
Definition: LogicalResult.h:26