summaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/cyc_complexity_plugin.c
Commit message (Collapse)AuthorAge
* gcc-plugins: Export symbols needed by gccKees Cook2016-10-31
| | | | | | | | This explicitly exports symbols that gcc expects from plugins. Based on code from Emese Revfy. Signed-off-by: Kees Cook <keescook@chromium.org>
* Add Cyclomatic complexity GCC pluginEmese Revfy2016-06-07
Add a very simple plugin to demonstrate the GCC plugin infrastructure. This GCC plugin computes the cyclomatic complexity of each function. The complexity M of a function's control flow graph is defined as: M = E - N + 2P where E = the number of edges N = the number of nodes P = the number of connected components (exit nodes). Signed-off-by: Emese Revfy <re.emese@gmail.com> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Michal Marek <mmarek@suse.com>