r295527 - Reuse a local variable. NFC.

Vedant Kumar via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 17 17:50:12 PST 2017


Author: vedantk
Date: Fri Feb 17 19:50:11 2017
New Revision: 295527

URL: http://llvm.org/viewvc/llvm-project?rev=295527&view=rev
Log:
Reuse a local variable. NFC.

Modified:
    cfe/trunk/lib/CodeGen/CodeGenPGO.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenPGO.cpp?rev=295527&r1=295526&r2=295527&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenPGO.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenPGO.cpp Fri Feb 17 19:50:11 2017
@@ -627,11 +627,9 @@ void CodeGenPGO::assignRegionCounters(Gl
   // 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);




More information about the cfe-commits mailing list