Browse Source

gcc: Export compatibility functions.

* gcc-plugin/src/utils.c (build_call_expr_loc_array)[!HAVE_DECL_BUILD_CALL_EXPR_LOC_ARRAY]:
  Remove `static' qualifier.
  (build_call_expr_loc_vec)[!HAVE_DECL_BUILD_CALL_EXPR_LOC]: Likewise.

* gcc-plugin/include/starpu-gcc/utils.h (build_call_expr_loc_array)[!HAVE_DECL_BUILD_CALL_EXPR_LOC_ARRAY]:
  New declaration.
  (build_call_expr_loc_vec)[!HAVE_DECL_BUILD_CALL_EXPR_LOC]: Likewise.
Ludovic Courtès 12 years ago
parent
commit
2a35f32336
2 changed files with 16 additions and 2 deletions
  1. 14 0
      gcc-plugin/include/starpu-gcc/utils.h
  2. 2 2
      gcc-plugin/src/utils.c

+ 14 - 0
gcc-plugin/include/starpu-gcc/utils.h

@@ -86,6 +86,20 @@ builtin_decl_explicit (enum built_in_function fncode)
 
 
 #endif
 #endif
 
 
+#if !HAVE_DECL_BUILD_CALL_EXPR_LOC_ARRAY
+
+extern tree build_call_expr_loc_array (location_t loc, tree fndecl, int n,
+				       tree *argarray);
+
+#endif
+
+#if !HAVE_DECL_BUILD_CALL_EXPR_LOC_VEC
+
+extern tree build_call_expr_loc_vec (location_t loc, tree fndecl,
+				     VEC(tree,gc) *vec);
+
+#endif
+
 #if !HAVE_DECL_BUILD_ZERO_CST
 #if !HAVE_DECL_BUILD_ZERO_CST
 
 
 extern tree build_zero_cst (tree type);
 extern tree build_zero_cst (tree type);

+ 2 - 2
gcc-plugin/src/utils.c

@@ -288,7 +288,7 @@ count (function_parm (bool, pred, (const_tree)), const_tree t)
 
 
 #if !HAVE_DECL_BUILD_CALL_EXPR_LOC_ARRAY
 #if !HAVE_DECL_BUILD_CALL_EXPR_LOC_ARRAY
 
 
-static tree
+tree
 build_call_expr_loc_array (location_t loc, tree fndecl, int n, tree *argarray)
 build_call_expr_loc_array (location_t loc, tree fndecl, int n, tree *argarray)
 {
 {
   tree fntype = TREE_TYPE (fndecl);
   tree fntype = TREE_TYPE (fndecl);
@@ -301,7 +301,7 @@ build_call_expr_loc_array (location_t loc, tree fndecl, int n, tree *argarray)
 
 
 #if !HAVE_DECL_BUILD_CALL_EXPR_LOC_VEC
 #if !HAVE_DECL_BUILD_CALL_EXPR_LOC_VEC
 
 
-static tree
+tree
 build_call_expr_loc_vec (location_t loc, tree fndecl, VEC(tree,gc) *vec)
 build_call_expr_loc_vec (location_t loc, tree fndecl, VEC(tree,gc) *vec)
 {
 {
   return build_call_expr_loc_array (loc, fndecl, VEC_length (tree, vec),
   return build_call_expr_loc_array (loc, fndecl, VEC_length (tree, vec),