summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MIRParser/MILexer.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/MIRParser/MILexer.h')
-rw-r--r--lib/CodeGen/MIRParser/MILexer.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/CodeGen/MIRParser/MILexer.h b/lib/CodeGen/MIRParser/MILexer.h
index 08b82e59c4fc..0204d549d5d4 100644
--- a/lib/CodeGen/MIRParser/MILexer.h
+++ b/lib/CodeGen/MIRParser/MILexer.h
@@ -1,4 +1,4 @@
-//===- MILexer.h - Lexer for machine instructions -------------------------===//
+//===- MILexer.h - Lexer for machine instructions ---------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -18,7 +18,7 @@
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
-#include <functional>
+#include <string>
namespace llvm {
@@ -60,14 +60,24 @@ struct MIToken {
kw_internal,
kw_early_clobber,
kw_debug_use,
+ kw_renamable,
kw_tied_def,
kw_frame_setup,
kw_debug_location,
kw_cfi_same_value,
kw_cfi_offset,
+ kw_cfi_rel_offset,
kw_cfi_def_cfa_register,
kw_cfi_def_cfa_offset,
+ kw_cfi_adjust_cfa_offset,
+ kw_cfi_escape,
kw_cfi_def_cfa,
+ kw_cfi_register,
+ kw_cfi_remember_state,
+ kw_cfi_restore,
+ kw_cfi_restore_state,
+ kw_cfi_undefined,
+ kw_cfi_window_save,
kw_blockaddress,
kw_intrinsic,
kw_target_index,
@@ -100,6 +110,7 @@ struct MIToken {
md_alias_scope,
md_noalias,
md_range,
+ md_diexpr,
// Identifier tokens
Identifier,
@@ -132,14 +143,14 @@ struct MIToken {
};
private:
- TokenKind Kind;
+ TokenKind Kind = Error;
StringRef Range;
StringRef StringValue;
std::string StringValueStorage;
APSInt IntVal;
public:
- MIToken() : Kind(Error) {}
+ MIToken() = default;
MIToken &reset(TokenKind Kind, StringRef Range);
@@ -164,7 +175,8 @@ public:
return Kind == kw_implicit || Kind == kw_implicit_define ||
Kind == kw_def || Kind == kw_dead || Kind == kw_killed ||
Kind == kw_undef || Kind == kw_internal ||
- Kind == kw_early_clobber || Kind == kw_debug_use;
+ Kind == kw_early_clobber || Kind == kw_debug_use ||
+ Kind == kw_renamable;
}
bool isMemoryOperandFlag() const {
@@ -203,4 +215,4 @@ StringRef lexMIToken(
} // end namespace llvm
-#endif
+#endif // LLVM_LIB_CODEGEN_MIRPARSER_MILEXER_H