//===- MILexer.h - Lexer for machine instructions ---------------*- C++ -*-===// // // 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 // //===----------------------------------------------------------------------===// // // This file declares the function that lexes the machine instruction source // string. // //===----------------------------------------------------------------------===// #ifndef LLVM_LIB_CODEGEN_MIRPARSER_MILEXER_H #define LLVM_LIB_CODEGEN_MIRPARSER_MILEXER_H #include "llvm/ADT/APSInt.h" #include "llvm/ADT/StringRef.h" #include <string> namespace llvm { class Twine; /// A token produced by the machine instruction lexer. struct MIToken { … }; /// Consume a single machine instruction token in the given source and return /// the remaining source string. StringRef lexMIToken( StringRef Source, MIToken &Token, function_ref<void(StringRef::iterator, const Twine &)> ErrorCallback); } // end namespace llvm #endif // LLVM_LIB_CODEGEN_MIRPARSER_MILEXER_H