summaryrefslogtreecommitdiff
path: root/lib/TableGen/TGLexer.cpp
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2014-08-07 05:47:00 +0000
committerPete Cooper <peter_cooper@apple.com>2014-08-07 05:47:00 +0000
commit42c1227fd99a396d83e15317c4cc17d6552379c3 (patch)
tree4aa1889ef989efed9541d59071460722f3e6ecf7 /lib/TableGen/TGLexer.cpp
parentf5b7351124ed4a871112cfb63daa68bac22b2b28 (diff)
Change TableGen so that binary literals such as 0b001 are now sized.
Instead of these becoming an integer literal internally, they now become bits<n> values. Prior to this change, 0b001 was 1 bit long. This is confusing as clearly the user gave 3 bits. This new type holds both the literal value and the size, and so can ensure sizes match on initializers. For example, this used to be legal bits<1> x = 0b00; but now it must be written as bits<2> x = 0b00; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/TableGen/TGLexer.cpp')
-rw-r--r--lib/TableGen/TGLexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/TableGen/TGLexer.cpp b/lib/TableGen/TGLexer.cpp
index cfcc119f82d..63b85842d6a 100644
--- a/lib/TableGen/TGLexer.cpp
+++ b/lib/TableGen/TGLexer.cpp
@@ -411,7 +411,7 @@ tgtok::TokKind TGLexer::LexNumber() {
if (CurPtr == NumStart)
return ReturnError(CurPtr-2, "Invalid binary number");
CurIntVal = strtoll(NumStart, nullptr, 2);
- return tgtok::IntVal;
+ return tgtok::BinaryIntVal;
}
}