[PATCH 6/7] diet: squeeze struct symbol's members

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



struct symbol::arguments is only used for functions, while
struct symbol::initializer is never used for functions.

Put both of them in an union in order to make the structure
a bit more lightweight.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 symbol.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/symbol.h b/symbol.h
index 1bedc75c3..d8733e99f 100644
--- a/symbol.h
+++ b/symbol.h
@@ -175,12 +175,14 @@ struct symbol {
 					transparent_union:1;
 			struct expression *array_size;
 			struct ctype ctype;
-			struct symbol_list *arguments;
 			struct statement *stmt;
+			union {
+				struct symbol_list *arguments;
+				struct expression *initializer;
+			};
 			struct symbol_list *symbol_list;
 			struct statement *inline_stmt;
 			struct symbol_list *inline_symbol_list;
-			struct expression *initializer;
 			struct entrypoint *ep;
 			struct symbol *definition;
 		};
-- 
2.13.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux