From 361f31b35ea26c70d4c168afd418fc481188025a Mon Sep 17 00:00:00 2001 From: Matt Gardner Date: Wed, 9 Aug 2017 14:15:48 -0700 Subject: [PATCH] Fix Issue #3497: move initialization to constructor --- lib/Backend/ValueInfo.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Backend/ValueInfo.h b/lib/Backend/ValueInfo.h index 799a98ae5ff..8c2c6158381 100644 --- a/lib/Backend/ValueInfo.h +++ b/lib/Backend/ValueInfo.h @@ -548,7 +548,7 @@ class JsTypeValueInfo : public ValueInfo JsTypeValueInfo(const JsTypeValueInfo& other) : ValueInfo(Uninitialized, ValueStructureKind::JsType), - jsType(other.jsType), jsTypeSet(other.jsTypeSet) + jsType(other.jsType), jsTypeSet(other.jsTypeSet), isShared(false) { } @@ -576,9 +576,7 @@ class JsTypeValueInfo : public ValueInfo public: JsTypeValueInfo * Copy(JitArenaAllocator *const allocator) const { - JsTypeValueInfo * newInfo = JitAnew(allocator, JsTypeValueInfo, *this); - newInfo->isShared = false; - return newInfo; + return JitAnew(allocator, JsTypeValueInfo, *this); } JITTypeHolder GetJsType() const