diff mbox

[4/5] teach sparse how to handle '-fmem-report'

Message ID 20170412083703.11552-5-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

Luc Van Oostenryck April 12, 2017, 8:37 a.m. UTC
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 lib.c | 7 +++----
 lib.h | 1 +
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/lib.c b/lib.c
index 1d21a2fb7..f316d120e 100644
--- a/lib.c
+++ b/lib.c
@@ -251,6 +251,7 @@  int dbg_entry = 0;
 int dbg_dead = 0;
 
 int fdump_linearize;
+int fmem_report = 0;
 
 int preprocess_only;
 
@@ -695,11 +696,9 @@  static char **handle_switch_f(char *arg, char **next)
 		return handle_switch_fdump(arg+5, next);
 
 	/* handle switches w/ arguments above, boolean and only boolean below */
+	if (handle_simple_switch(arg, "mem-report", &fmem_report))
+		return next;
 
-	if (!strncmp(arg, "no-", 3)) {
-		arg += 3;
-	}
-	/* handle switch here.. */
 	return next;
 }
 
diff --git a/lib.h b/lib.h
index fb612d154..14cb68af0 100644
--- a/lib.h
+++ b/lib.h
@@ -137,6 +137,7 @@  extern int dbg_entry;
 extern int dbg_dead;
 
 extern int fdump_linearize;
+extern int fmem_report;
 
 extern int arch_m64;