diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-03-20 11:40:34 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-05-14 11:43:05 +0000 |
commit | 349cc55c9796c4596a5b9904cd3281af295f878f (patch) | |
tree | 410c5a785075730a35f1272ca6a7adf72222ad03 /contrib/llvm-project/llvm/lib/Support/JSON.cpp | |
parent | cb2ae6163174b90e999326ecec3699ee093a5d43 (diff) | |
parent | c0981da47d5696fe36474fcf86b4ce03ae3ff818 (diff) |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/JSON.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Support/JSON.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/JSON.cpp b/contrib/llvm-project/llvm/lib/Support/JSON.cpp index dbfd673553f4..17b36ed51850 100644 --- a/contrib/llvm-project/llvm/lib/Support/JSON.cpp +++ b/contrib/llvm-project/llvm/lib/Support/JSON.cpp @@ -109,6 +109,7 @@ void Value::copyFrom(const Value &M) { case T_Boolean: case T_Double: case T_Integer: + case T_UINT64: memcpy(&Union, &M.Union, sizeof(Union)); break; case T_StringRef: @@ -133,6 +134,7 @@ void Value::moveFrom(const Value &&M) { case T_Boolean: case T_Double: case T_Integer: + case T_UINT64: memcpy(&Union, &M.Union, sizeof(Union)); break; case T_StringRef: @@ -159,6 +161,7 @@ void Value::destroy() { case T_Boolean: case T_Double: case T_Integer: + case T_UINT64: break; case T_StringRef: as<StringRef>().~StringRef(); @@ -750,6 +753,8 @@ void llvm::json::OStream::value(const Value &V) { valueBegin(); if (V.Type == Value::T_Integer) OS << *V.getAsInteger(); + else if (V.Type == Value::T_UINT64) + OS << *V.getAsUINT64(); else OS << format("%.*g", std::numeric_limits<double>::max_digits10, *V.getAsNumber()); |