mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
Add Cyclomatic complexity GCC plugin
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>
This commit is contained in:
committed by
Michal Marek
parent
6b90bd4ba4
commit
0dae776c6b
@@ -17,4 +17,5 @@ export GCCPLUGINS_DIR HOSTLIBS
|
||||
$(HOSTLIBS)-y := $(GCC_PLUGIN)
|
||||
always := $($(HOSTLIBS)-y)
|
||||
|
||||
cyc_complexity_plugin-objs := cyc_complexity_plugin.o
|
||||
clean-files += *.so
|
||||
|
||||
Reference in New Issue
Block a user