bloomberg / clangmetatool

A framework for reusing code in Clang tools
https://bloomberg.github.io/clangmetatool/
Apache License 2.0
119 stars 25 forks source link

Include graph backup restore state #69

Closed liangti closed 2 years ago

liangti commented 2 years ago

Issue number of the reported bug or feature request: #

Describe your changes

The state of include graph can be changed by IncludeGraphDependencies(for example decrementReferenceCount)

This PR adds support to reset state of include graph

Testing performed

In the test we change the include graph by decreasing the reference count, and then do reset to reset state and verify the include graph rollback to initial state after doing reset

Additional context The motivation of having this feature is that we need to modify include statements in different contexts and they are independent. So that we need to have a way to reset include graph state when finishing one context and then going to another

liangti commented 2 years ago

@dbeer1 @envp

envp commented 2 years ago

ack