[PATCH] D59016: [TableGen] Allow 2^63-1 and 2^63-2 as int literals.
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 12 02:29:16 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL355900: [TableGen] Allow 2^63-1 and 2^63-2 as int literals. (authored by statham, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D59016?vs=190055&id=190226#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59016/new/
https://reviews.llvm.org/D59016
Files:
llvm/trunk/lib/TableGen/Record.cpp
llvm/trunk/test/TableGen/IntSpecialValues.td
Index: llvm/trunk/lib/TableGen/Record.cpp
===================================================================
--- llvm/trunk/lib/TableGen/Record.cpp
+++ llvm/trunk/lib/TableGen/Record.cpp
@@ -32,6 +32,7 @@
#include <cassert>
#include <cstdint>
#include <memory>
+#include <map>
#include <string>
#include <utility>
#include <vector>
@@ -457,7 +458,7 @@
}
IntInit *IntInit::get(int64_t V) {
- static DenseMap<int64_t, IntInit*> ThePool;
+ static std::map<int64_t, IntInit*> ThePool;
IntInit *&I = ThePool[V];
if (!I) I = new(Allocator) IntInit(V);
Index: llvm/trunk/test/TableGen/IntSpecialValues.td
===================================================================
--- llvm/trunk/test/TableGen/IntSpecialValues.td
+++ llvm/trunk/test/TableGen/IntSpecialValues.td
@@ -0,0 +1,8 @@
+// RUN: llvm-tblgen %s | FileCheck %s
+
+def TestRecord {
+ // CHECK: int X = 9223372036854775807;
+ int X = 0x7FFFFFFFFFFFFFFF;
+ // CHECK: int Y = 9223372036854775806;
+ int Y = 0x7FFFFFFFFFFFFFFE;
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59016.190226.patch
Type: text/x-patch
Size: 1009 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190312/8d2d376e/attachment.bin>
More information about the llvm-commits
mailing list