mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-16 16:37:30 +00:00
[sancov] skip duplicated points
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290278 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fd40c60332
commit
57e4fa8aaa
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user