MCPcopy Create free account
hub / github.com/apache/impala / DiagnosticHandlerFn

Method DiagnosticHandlerFn

be/src/codegen/llvm-codegen.cc:2042–2057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2040}
2041
2042void LlvmCodeGen::DiagnosticHandler::DiagnosticHandlerFn(
2043 const llvm::DiagnosticInfo& info, void* context) {
2044 if (info.getSeverity() == llvm::DiagnosticSeverity::DS_Error) {
2045 LlvmCodeGen* codegen = reinterpret_cast<LlvmCodeGen*>(context);
2046 codegen->diagnostic_handler_.error_str_.clear();
2047 llvm::raw_string_ostream error_msg(codegen->diagnostic_handler_.error_str_);
2048 llvm::DiagnosticPrinterRawOStream diagnostic_printer(error_msg);
2049 diagnostic_printer << "LLVM diagnostic error: ";
2050 info.print(diagnostic_printer);
2051 error_msg.flush();
2052 if (codegen->state_) {
2053 LOG(INFO) << "Query " << PrintId(codegen->state_->query_id()) << " encountered a "
2054 << codegen->diagnostic_handler_.error_str_;
2055 }
2056 }
2057}
2058
2059string LlvmCodeGen::DiagnosticHandler::GetErrorString() {
2060 if (!error_str_.empty()) {

Callers

nothing calls this directly

Calls 5

PrintIdFunction · 0.85
clearMethod · 0.65
printMethod · 0.45
flushMethod · 0.45
query_idMethod · 0.45

Tested by

no test coverage detected