projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
987f642
)
[sancov] skip duplicated points
author
Mike Aizatsky
<aizatsky@chromium.org>
Wed, 21 Dec 2016 22:10:01 +0000
(22:10 +0000)
committer
Mike Aizatsky
<aizatsky@chromium.org>
Wed, 21 Dec 2016 22:10:01 +0000
(22:10 +0000)
llvm-svn: 290278
llvm/tools/sancov/sancov.cc
patch
|
blob
|
history
diff --git
a/llvm/tools/sancov/sancov.cc
b/llvm/tools/sancov/sancov.cc
index
d7ce120
..
ff2039d
100644
(file)
--- a/
llvm/tools/sancov/sancov.cc
+++ b/
llvm/tools/sancov/sancov.cc
@@
-408,6
+408,8
@@
static void operator<<(JSONWriter &W,
for (const auto &P : PointsByFn) {
std::string FunctionName = P.first;
+ std::set<std::string> WrittenIds;
+
ByFn->key(FunctionName);
// Output <point_id> : "<line>:<col>".
@@
-416,7
+418,10
@@
static void operator<<(JSONWriter &W,
for (const auto &Loc : Point->Locs) {
if (Loc.FileName != FileName || Loc.FunctionName != FunctionName)
continue;
+ if (WrittenIds.find(Point->Id) != WrittenIds.end())
+ continue;
+ WrittenIds.insert(Point->Id);
ById->key(Point->Id);
W << (utostr(Loc.Line) + ":" + utostr(Loc.Column));
}