#include "mlir/Tools/mlir-translate/Translation.h"
#include "mlir/IR/AsmState.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/Verifier.h"
#include "mlir/Parser/Parser.h"
#include "mlir/Tools/ParseUtilities.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/SourceMgr.h"
#include <optional>
usingnamespacemlir;
struct TranslationOptions { … };
static llvm::ManagedStatic<TranslationOptions> clOptions;
void mlir::registerTranslationCLOptions() { … }
static llvm::StringMap<Translation> &getTranslationRegistry() { … }
static void registerTranslation(StringRef name, StringRef description,
std::optional<llvm::Align> inputAlignment,
const TranslateFunction &function) { … }
TranslateRegistration::TranslateRegistration(
StringRef name, StringRef description, const TranslateFunction &function) { … }
static void registerTranslateToMLIRFunction(
StringRef name, StringRef description,
const DialectRegistrationFunction &dialectRegistration,
std::optional<llvm::Align> inputAlignment,
const TranslateSourceMgrToMLIRFunction &function) { … }
TranslateToMLIRRegistration::TranslateToMLIRRegistration(
StringRef name, StringRef description,
const TranslateSourceMgrToMLIRFunction &function,
const DialectRegistrationFunction &dialectRegistration,
std::optional<llvm::Align> inputAlignment) { … }
TranslateToMLIRRegistration::TranslateToMLIRRegistration(
StringRef name, StringRef description,
const TranslateRawSourceMgrToMLIRFunction &function,
const DialectRegistrationFunction &dialectRegistration,
std::optional<llvm::Align> inputAlignment) { … }
TranslateToMLIRRegistration::TranslateToMLIRRegistration(
StringRef name, StringRef description,
const TranslateStringRefToMLIRFunction &function,
const DialectRegistrationFunction &dialectRegistration,
std::optional<llvm::Align> inputAlignment) { … }
TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(
StringRef name, StringRef description,
const TranslateFromMLIRFunction &function,
const DialectRegistrationFunction &dialectRegistration) { … }
TranslationParser::TranslationParser(llvm::cl::Option &opt)
: … { … }
void TranslationParser::printOptionInfo(const llvm::cl::Option &o,
size_t globalWidth) const { … }