diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp index 4222a0b57fb8..7577f0b85716 100644 --- a/llvm/lib/TableGen/Record.cpp +++ b/llvm/lib/TableGen/Record.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -457,7 +458,7 @@ Init *BitsInit::resolveReferences(Resolver &R) const { } IntInit *IntInit::get(int64_t V) { - static DenseMap ThePool; + static std::map ThePool; IntInit *&I = ThePool[V]; if (!I) I = new(Allocator) IntInit(V); diff --git a/llvm/test/TableGen/IntSpecialValues.td b/llvm/test/TableGen/IntSpecialValues.td new file mode 100644 index 000000000000..be91282366fa --- /dev/null +++ b/llvm/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; +}