Просмотр исходного кода

gcc: Tweak includes.

* gcc-plugin/src/c-expr.y: Include <diagnostic-core.h>.
* gcc-plugin/src/opencl.c: Include <sys/mman.h>; include <stdlib.h> &
  co. after GCC headers.
* gcc-plugin/src/starpu.c: Remove <sys/mman.h> inclusion.
* gcc-plugin/src/tasks.c: Include <diagnostic-core.h>.
Ludovic Courtès лет назад: 12
Родитель
Сommit
178363cf1c
4 измененных файлов с 10 добавлено и 6 удалено
  1. 2 0
      gcc-plugin/src/c-expr.y
  2. 6 5
      gcc-plugin/src/opencl.c
  3. 0 1
      gcc-plugin/src/starpu.c
  4. 2 0
      gcc-plugin/src/tasks.c

+ 2 - 0
gcc-plugin/src/c-expr.y

@@ -42,6 +42,8 @@
   # include <c-pragma.h>
   #endif
 
+  #include <diagnostic-core.h>
+
   #if !HAVE_DECL_BUILD_ARRAY_REF
   /* This declaration is missing in GCC 4.6.1.  */
   extern tree build_array_ref (location_t loc, tree array, tree index);

+ 6 - 5
gcc-plugin/src/opencl.c

@@ -16,11 +16,6 @@
 
 #include <starpu-gcc/config.h>
 
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <starpu.h>
-
 #include <gcc-plugin.h>
 #include <plugin-version.h>
 #include <plugin.h>
@@ -37,6 +32,12 @@
 # include <c-common.h>
 #endif
 
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/mman.h>
+
+#include <starpu.h>
+
 #include <starpu-gcc/utils.h>
 #include <starpu-gcc/tasks.h>
 

+ 0 - 1
gcc-plugin/src/starpu.c

@@ -53,7 +53,6 @@
 #include <toplev.h>
 
 #include <stdio.h>
-#include <sys/mman.h>
 
 #include <starpu-gcc/utils.h>
 #include <starpu-gcc/tasks.h>

+ 2 - 0
gcc-plugin/src/tasks.c

@@ -31,6 +31,8 @@
 # include <c-common.h>
 #endif
 
+#include <diagnostic-core.h>
+
 #include <starpu-gcc/tasks.h>
 #include <starpu-gcc/utils.h>
 #include <starpu-gcc/opencl.h>