[PATCH 7/7] builtin: merge declare_builtin_function() with declare_builtins()

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

 



declare_builtin_functions() contained only the declaration of 3
(Blackfin specific) builtin functions.

Move these to declare_builtins() where all other builtin are declared.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 builtin.c |  5 +++++
 lib.c     | 18 ------------------
 2 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/builtin.c b/builtin.c
index 7f9ff3582..b409a7757 100644
--- a/builtin.c
+++ b/builtin.c
@@ -459,4 +459,9 @@ void declare_builtins(void)
 	declare_builtin("__sync_synchronize", &void_ctype, 0, NULL);
 	declare_builtin("__sync_val_compare_and_swap", &int_ctype, 1, &ptr_ctype, NULL);
 	declare_builtin("__sync_xor_and_fetch", &int_ctype, 1, &ptr_ctype, NULL);
+
+	// Blackfin-specific stuff
+	declare_builtin("__builtin_bfin_csync", &void_ctype, 0, NULL);
+	declare_builtin("__builtin_bfin_ssync", &void_ctype, 0, NULL);
+	declare_builtin("__builtin_bfin_norm_fr1x32", &int_ctype, 0, &int_ctype, NULL);
 }
diff --git a/lib.c b/lib.c
index f9d7e094d..e4d99c5e1 100644
--- a/lib.c
+++ b/lib.c
@@ -1215,23 +1215,6 @@ static void predefined_macros(void)
 	predefine("__pragma__", 0, NULL);
 }
 
-static void declare_builtin_functions(void)
-{
-	/* Note:
-	 * Most builtin functions are declared in builtin.c:declare_builtins().
-	 * Some are also defined in builtin:init_builtins().
-	 */
-
-	/* Add Blackfin-specific stuff */
-	add_pre_buffer(
-		"#ifdef __bfin__\n"
-		"extern void __builtin_bfin_csync(void);\n"
-		"extern void __builtin_bfin_ssync(void);\n"
-		"extern int __builtin_bfin_norm_fr1x32(int);\n"
-		"#endif\n"
-	);
-}
-
 static void create_builtin_stream(void)
 {
 	// Temporary hack
@@ -1387,7 +1370,6 @@ struct symbol_list *sparse_initialize(int argc, char **argv, struct string_list
 		create_builtin_stream();
 		if (!preprocess_only) {
 			declare_builtins();
-			declare_builtin_functions();
 		}
 
 		list = sparse_initial();
-- 
2.17.1

--
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