From 6b0257108c583b0e3fd1cb480855173990d9ca7c Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Sat, 18 Feb 2017 01:50:11 +0000 Subject: [PATCH] Reuse a local variable. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295527 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenPGO.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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); -- 2.40.0