瀏覽代碼

Reuse a local variable. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295527 91177308-0d34-0410-b5e6-96231b3b80d8
Vedant Kumar 8 年之前
父節點
當前提交
6b0257108c
共有 1 個文件被更改,包括 3 次插入5 次删除
  1. 3 5
      lib/CodeGen/CodeGenPGO.cpp

+ 3 - 5
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<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);