From: Vedant Kumar Date: Sat, 18 Feb 2017 01:50:11 +0000 (+0000) Subject: Reuse a local variable. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b0257108c583b0e3fd1cb480855173990d9ca7c;p=clang Reuse a local variable. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295527 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenPGO.cpp b/lib/CodeGen/CodeGenPGO.cpp index c6c3fa41e6..3d3a0cce2a 100644 --- a/lib/CodeGen/CodeGenPGO.cpp +++ b/lib/CodeGen/CodeGenPGO.cpp @@ -627,11 +627,9 @@ void CodeGenPGO::assignRegionCounters(GlobalDecl GD, llvm::Function *Fn) { // If so, instrument only base variant, others are implemented by delegation // to the base one, it would be counted twice otherwise. if (CGM.getTarget().getCXXABI().hasConstructorVariants() && - ((isa(GD.getDecl()) && - GD.getCtorType() != Ctor_Base) || - (isa(GD.getDecl()) && - GD.getDtorType() != Dtor_Base))) { - return; + ((isa(D) && GD.getCtorType() != Ctor_Base) || + (isa(D) && GD.getDtorType() != Dtor_Base))) { + return; } CGM.ClearUnusedCoverageMapping(D); setFuncName(Fn);