[llvm] r288423 - [dsymutil] Simplify a lazy-init condition/expression
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 14:04:16 PST 2016
Author: dblaikie
Date: Thu Dec 1 16:04:16 2016
New Revision: 288423
URL: http://llvm.org/viewvc/llvm-project?rev=288423&view=rev
Log:
[dsymutil] Simplify a lazy-init condition/expression
Modified:
llvm/trunk/tools/dsymutil/DwarfLinker.cpp
Modified: llvm/trunk/tools/dsymutil/DwarfLinker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/DwarfLinker.cpp?rev=288423&r1=288422&r2=288423&view=diff
==============================================================================
--- llvm/trunk/tools/dsymutil/DwarfLinker.cpp (original)
+++ llvm/trunk/tools/dsymutil/DwarfLinker.cpp Thu Dec 1 16:04:16 2016
@@ -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());
More information about the llvm-commits
mailing list