For and edge in the include graph, decrement the usage reference count of this edge,
returning a boolean indicating the success of the operation. Operation is considered failed if the edge doesn't exist or if the count is already 0.
Testing performed
Added a test case t/031-validate-incldue-graph.t.cpp for the features proposed.
Issue number of the reported bug or feature request: Internal ticket
Describe your changes We add the ability to track live dependencies of a header in the include graph through counts of:
provided by
file uid A
throughfile uid B
. We call this the 'usage reference count' of the edge{A, B}
.Add new method:
std::set<FileGraphEdge> IncludeGraph::liveDependencies(FileUID headerUID)
headerUID
bool IncludeGraph::decrementRefCount(FileGraphEdge edge)
edge
in the include graph, decrement the usage reference count of this edge, returning a boolean indicating the success of the operation. Operation is considered failed if the edge doesn't exist or if the count is already 0.Testing performed Added a test case
t/031-validate-incldue-graph.t.cpp
for the features proposed.Test suite passes locally on:
LLVM-7 / ubuntu:18.04
LLVM-8 / ubuntu:18.10
LLVM-9 / ubuntu:19.04