]> granicus.if.org Git - clang/commitdiff
Reuse a local variable. NFC.
authorVedant Kumar <vsk@apple.com>
Sat, 18 Feb 2017 01:50:11 +0000 (01:50 +0000)
committerVedant Kumar <vsk@apple.com>
Sat, 18 Feb 2017 01:50:11 +0000 (01:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295527 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenPGO.cpp

index c6c3fa41e62818831e30a083906f45073568cd35..3d3a0cce2aa9e88fe9897dc747c9b1f71550c994 100644 (file)
@@ -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<CXXConstructorDecl>(GD.getDecl()) &&
-        GD.getCtorType() != Ctor_Base) ||
-       (isa<CXXDestructorDecl>(GD.getDecl()) &&
-        GD.getDtorType() != Dtor_Base))) {
-      return;
+      ((isa<CXXConstructorDecl>(D) && GD.getCtorType() != Ctor_Base) ||
+       (isa<CXXDestructorDecl>(D) && GD.getDtorType() != Dtor_Base))) {
+    return;
   }
   CGM.ClearUnusedCoverageMapping(D);
   setFuncName(Fn);