aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/JSON.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/JSON.cpp')
-rw-r--r--llvm/lib/Support/JSON.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/JSON.cpp b/llvm/lib/Support/JSON.cpp
index 8471e58..dbfd673 100644
--- a/llvm/lib/Support/JSON.cpp
+++ b/llvm/lib/Support/JSON.cpp
@@ -109,7 +109,7 @@ void Value::copyFrom(const Value &M) {
case T_Boolean:
case T_Double:
case T_Integer:
- memcpy(Union.buffer, M.Union.buffer, sizeof(Union.buffer));
+ memcpy(&Union, &M.Union, sizeof(Union));
break;
case T_StringRef:
create<StringRef>(M.as<StringRef>());
@@ -133,7 +133,7 @@ void Value::moveFrom(const Value &&M) {
case T_Boolean:
case T_Double:
case T_Integer:
- memcpy(Union.buffer, M.Union.buffer, sizeof(Union.buffer));
+ memcpy(&Union, &M.Union, sizeof(Union));
break;
case T_StringRef:
create<StringRef>(M.as<StringRef>());