瀏覽代碼

gcc: opencl: Correctly honor `-fplugin-arg-starpu-opencl-include-dir'.

* gcc-plugin/src/starpu.c (build_variable_from_file_contents): Don't
  break out of the loop when ERR is zero.  Regression introduced in
  r6712 ("gcc: Fix handling of `opencl_include_dirs' on GCC 4.7+.").
Ludovic Courtès 13 年之前
父節點
當前提交
6c0cabc847
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      gcc-plugin/src/starpu.c

+ 4 - 4
gcc-plugin/src/starpu.c

@@ -1100,10 +1100,10 @@ build_variable_from_file_contents (location_t loc,
 	  err = fstatat (dir_fd, file, &st, 0);
 	  if (err != 0)
 	    close (dir_fd);
-
-	  /* Leave DIRS unchanged so it can be referred to in diagnostics
-	     below.  */
-	  break;
+	  else
+	    /* Leave DIRS unchanged so it can be referred to in diagnostics
+	       below.  */
+	    break;
 	}
     }