summaryrefslogtreecommitdiff
path: root/include/llvm/Support
diff options
context:
space:
mode:
authorYuchen Wu <yuchenericwu@hotmail.com>2013-12-16 22:14:02 +0000
committerYuchen Wu <yuchenericwu@hotmail.com>2013-12-16 22:14:02 +0000
commit89452cf827d9699027b60212b2795b9e14d5ea7a (patch)
treece6adccda064c510b0aff95edbb87d20d0bcd458 /include/llvm/Support
parente77491226adefca4fe5aebb1e689c9d04903cc90 (diff)
downloadllvm-89452cf827d9699027b60212b2795b9e14d5ea7a.tar.gz
llvm-89452cf827d9699027b60212b2795b9e14d5ea7a.tar.bz2
llvm-89452cf827d9699027b60212b2795b9e14d5ea7a.tar.xz
llvm-cov: Added -u option for unconditional branch info.
Outputs branch information for unconditional branches in addition to conditional branches. -b option must be enabled. Also updated tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/GCOV.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/llvm/Support/GCOV.h b/include/llvm/Support/GCOV.h
index 9b3d4962a4..de93e1dee2 100644
--- a/include/llvm/Support/GCOV.h
+++ b/include/llvm/Support/GCOV.h
@@ -36,9 +36,12 @@ namespace GCOV {
/// GCOVOptions - A struct for passing gcov options between functions.
struct GCOVOptions {
- GCOVOptions(bool A, bool B): AllBlocks(A), BranchProb(B) {}
+ GCOVOptions(bool A, bool B, bool U) :
+ AllBlocks(A), BranchProb(B), UncondBranch(U) {}
+
bool AllBlocks;
bool BranchProb;
+ bool UncondBranch;
};
/// GCOVBuffer - A wrapper around MemoryBuffer to provide GCOV specific
@@ -365,7 +368,9 @@ public:
void printBlockInfo(raw_fd_ostream &OS, const GCOVBlock &Block,
uint32_t LineIndex, uint32_t &BlockNo) const;
void printBranchInfo(raw_fd_ostream &OS, const GCOVBlock &Block,
- uint32_t LineIndex, uint32_t &EdgeNo) const;
+ uint32_t &EdgeNo) const;
+ void printUncondBranchInfo(raw_fd_ostream &OS, uint32_t &EdgeNo,
+ uint64_t Count) const;
private:
const GCOVOptions &Options;
StringMap<LineData> LineInfo;