From: David Blaikie Date: Thu, 1 Dec 2016 22:04:16 +0000 (+0000) Subject: [dsymutil] Simplify a lazy-init condition/expression X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2af4e8b52ab1bced00772e66e59640e8e1c1a1c2;p=llvm [dsymutil] Simplify a lazy-init condition/expression git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288423 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/dsymutil/DwarfLinker.cpp b/tools/dsymutil/DwarfLinker.cpp index d692d49fe31..10c1274b4d8 100644 --- a/tools/dsymutil/DwarfLinker.cpp +++ b/tools/dsymutil/DwarfLinker.cpp @@ -2716,10 +2716,9 @@ DIE *DwarfLinker::DIECloner::cloneDIE( if (!Die) { // The DIE might have been already created by a forward reference // (see cloneDieReferenceAttribute()). - if (Info.Clone) - Die = Info.Clone; - else - Die = Info.Clone = DIE::get(DIEAlloc, dwarf::Tag(InputDIE.getTag())); + if (!Info.Clone) + Info.Clone = DIE::get(DIEAlloc, dwarf::Tag(InputDIE.getTag())); + Die = Info.Clone; } assert(Die->getTag() == InputDIE.getTag());