aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Phipps <a-phipps@ti.com>2020-12-28 11:20:48 -0600
committerAlan Phipps <a-phipps@ti.com>2021-01-05 09:51:51 -0600
commit9f2967bcfe2f7d1fc02281f0098306c90c2c10a5 (patch)
treea29793dac7b81d67601905911a389a2cf2cdde2e /clang/lib/CodeGen/CoverageMappingGen.h
parent[clang-tidy] Add extra tests (diff)
downloadllvm-project-9f2967bcfe2f7d1fc02281f0098306c90c2c10a5.tar.gz
llvm-project-9f2967bcfe2f7d1fc02281f0098306c90c2c10a5.tar.bz2
llvm-project-9f2967bcfe2f7d1fc02281f0098306c90c2c10a5.zip
[Coverage] Add support for Branch Coverage in LLVM Source-Based Code Coverage
This is an enhancement to LLVM Source-Based Code Coverage in clang to track how many times individual branch-generating conditions are taken (evaluate to TRUE) and not taken (evaluate to FALSE). Individual conditions may comprise larger boolean expressions using boolean logical operators. This functionality is very similar to what is supported by GCOV except that it is very closely anchored to the ASTs. Differential Revision: https://reviews.llvm.org/D84467
Diffstat (limited to 'clang/lib/CodeGen/CoverageMappingGen.h')
-rw-r--r--clang/lib/CodeGen/CoverageMappingGen.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CoverageMappingGen.h b/clang/lib/CodeGen/CoverageMappingGen.h
index 645ad23a9ccd..9d0aa3b9cad1 100644
--- a/clang/lib/CodeGen/CoverageMappingGen.h
+++ b/clang/lib/CodeGen/CoverageMappingGen.h
@@ -122,6 +122,9 @@ public:
/// Return the coverage mapping translation unit file id
/// for the given file.
unsigned getFileID(const FileEntry *File);
+
+ /// Return an interface into CodeGenModule.
+ CodeGenModule &getCodeGenModule() { return CGM; }
};
/// Organizes the per-function state that is used while generating