diff --git a/llvm/tools/dsymutil/DwarfLinker.cpp b/llvm/tools/dsymutil/DwarfLinker.cpp index d692d49fe31a..10c1274b4d8b 100644 --- a/llvm/tools/dsymutil/DwarfLinker.cpp +++ b/llvm/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());