llvm_ctx.setDiagnosticHandler(diagnostic_handler, &r_log);
#endif
+ if (get_debug_flags() & DBG_CLC)
+ debug_log(source, ".cl");
+
// The input file name must have the .cl extension in order for the
// CompilerInvocation class to recognize it as an OpenCL source file.
llvm::Module *mod = compile_llvm(llvm_ctx, source, headers, "input.cl",
optimize(mod, optimization_level, kernels);
- if (get_debug_flags() & DBG_CLC)
- debug_log(source, ".cl");
-
if (get_debug_flags() & DBG_LLVM) {
std::string log;
llvm::raw_string_ostream s_log(log);