Commit 745b1f55 authored by Serge Martin's avatar Serge Martin Committed by Tom Stellard
Browse files

clover: clCompileProgram CL_INVALID_COMPILER_OPTIONS



clCompileProgram should return CL_INVALID_COMPILER_OPTIONS
instead of CL_INVALID_BUILD_OPTIONS
Reviewed-by: Francisco Jerez's avatarFrancisco Jerez <currojerez@riseup.net>
parent 29c7cf2b
......@@ -182,6 +182,8 @@ clBuildProgram(cl_program d_prog, cl_uint num_devs,
prog.build(devs, opts);
return CL_SUCCESS;
} catch (error &e) {
if (e.get() == CL_INVALID_COMPILER_OPTIONS)
return CL_INVALID_BUILD_OPTIONS;
if (e.get() == CL_COMPILE_PROGRAM_FAILURE)
return CL_BUILD_PROGRAM_FAILURE;
return e.get();
......
......@@ -177,7 +177,7 @@ namespace {
opts_carray.data() + opts_carray.size(),
Diags);
if (!Success) {
throw error(CL_INVALID_BUILD_OPTIONS);
throw error(CL_INVALID_COMPILER_OPTIONS);
}
c.getFrontendOpts().ProgramAction = clang::frontend::EmitLLVMOnly;
c.getHeaderSearchOpts().UseBuiltinIncludes = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment