links: create a smatch_links.c file with functions for reverse links
commit8aca66ff96a38f166eff15a28a48915a119add20
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 24 Sep 2014 13:05:39 +0000 (24 16:05 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 24 Sep 2014 13:05:39 +0000 (24 16:05 +0300)
tree4a4af362b27f014bd66d4b8abe7ef0a5ce2ba98f
parentbeae6b2be4599114ad56eb4a2deed73d3c5a2f3d
links: create a smatch_links.c file with functions for reverse links

We have two places now which use the concept of reverse links.  Say you
have code like:

if (foo == bar) {

And you want to store in smatch_stored_conditions.c that the condition is
true or false, then you can do that.  But if either "foo" or "bar" changes
then you have to find the "foo == bar" state and set it to undefined.

So we have a state "foo == bar" and a link from "foo" to the state and link
from "bar" to the state.

This smatch_links.c file puts together some helper functions to make links
like this easier to use.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Makefile
smatch.h
smatch_links.c [new file with mode: 0644]