diff options
author | Justin Bogner <mail@justinbogner.com> | 2015-07-28 00:41:51 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2015-07-28 00:41:51 +0000 |
commit | 203f09223bb0bed16194d6a28431ba6a2fd5346a (patch) | |
tree | 4a81e9bca5a80fe3ffdad2cd3249da897e523bcf /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 80414569b8c73bfc5c10a7fd93b2c37c96ddfdae (diff) | |
download | llvm-203f09223bb0bed16194d6a28431ba6a2fd5346a.zip llvm-203f09223bb0bed16194d6a28431ba6a2fd5346a.tar.gz llvm-203f09223bb0bed16194d6a28431ba6a2fd5346a.tar.bz2 |
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index f6bd6a4..e899c94 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -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()) |