projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TableGen: allow use of uint64_t for available features mask.
[oota-llvm.git]
/
lib
/
TableGen
/
TGLexer.h
diff --git
a/lib/TableGen/TGLexer.h
b/lib/TableGen/TGLexer.h
index c7f7306a1492e82a506ae0391069f1a99fd27804..1f750fcd8d96b6abe43e18c2e82ca1ba2228fd10 100644
(file)
--- a/
lib/TableGen/TGLexer.h
+++ b/
lib/TableGen/TGLexer.h
@@
-11,8
+11,8
@@
//
//===----------------------------------------------------------------------===//
//
//===----------------------------------------------------------------------===//
-#ifndef TGLEXER_H
-#define TGLEXER_H
+#ifndef
LLVM_LIB_TABLEGEN_
TGLEXER_H
+#define
LLVM_LIB_TABLEGEN_
TGLEXER_H
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/DataTypes.h"
@@
-52,6
+52,10
@@
namespace tgtok {
// Integer value.
IntVal,
// Integer value.
IntVal,
+
+ // Binary constant. Note that these are sized according to the number of
+ // bits given.
+ BinaryIntVal,
// String valued tokens.
Id, StrVal, VarName, CodeFragment
// String valued tokens.
Id, StrVal, VarName, CodeFragment
@@
-105,6
+109,11
@@
public:
assert(CurCode == tgtok::IntVal && "This token isn't an integer");
return CurIntVal;
}
assert(CurCode == tgtok::IntVal && "This token isn't an integer");
return CurIntVal;
}
+ std::pair<int64_t, unsigned> getCurBinaryIntVal() const {
+ assert(CurCode == tgtok::BinaryIntVal &&
+ "This token isn't a binary integer");
+ return std::make_pair(CurIntVal, (CurPtr - TokStart)-2);
+ }
SMLoc getLoc() const;
SMLoc getLoc() const;