InstrProf: Fix a misuse of the FunctionDecl API when generating coverage
This was calling FD->hasBody(), meaning "Does the function that this decl refers to have a body?", rather than FD->doesThisDeclarationHaveABody(), meaning "Is this decl a non-deleted definition?". We might want to consider renaming these APIs :/ llvm-svn: 243360
This commit is contained in:
@@ -3406,7 +3406,7 @@ void CodeGenModule::AddDeferredUnusedCoverageMapping(Decl *D) {
|
||||
case Decl::ObjCMethod:
|
||||
case Decl::CXXConstructor:
|
||||
case Decl::CXXDestructor: {
|
||||
if (!cast<FunctionDecl>(D)->hasBody())
|
||||
if (!cast<FunctionDecl>(D)->doesThisDeclarationHaveABody())
|
||||
return;
|
||||
auto I = DeferredEmptyCoverageMappingDecls.find(D);
|
||||
if (I == DeferredEmptyCoverageMappingDecls.end())
|
||||
|
||||
Reference in New Issue
Block a user