summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenPGO.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-02-18 01:50:11 +0000
committerVedant Kumar <vsk@apple.com>2017-02-18 01:50:11 +0000
commitcab432d97d05816dd5820f902ebaa43cd07f94d3 (patch)
tree1fe2bafa7f4dd37b6d2206472337c7f5e3d7b440 /clang/lib/CodeGen/CodeGenPGO.cpp
parent3720124545c70cc24f5cfbf54015ac4e25373b90 (diff)
downloadbcm5719-llvm-cab432d97d05816dd5820f902ebaa43cd07f94d3.tar.gz
bcm5719-llvm-cab432d97d05816dd5820f902ebaa43cd07f94d3.zip
Reuse a local variable. NFC.
llvm-svn: 295527
Diffstat (limited to 'clang/lib/CodeGen/CodeGenPGO.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenPGO.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp
index c6c3fa41e62..3d3a0cce2aa 100644
--- a/clang/lib/CodeGen/CodeGenPGO.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud