Generated IR for a bigint NULL literal: define { i8, i64 } @NullLiteral( %"class.impala::ScalarExprEvaluator"* %eval, %"class.impala::TupleRow"* %row) { entry: ret { i8, i64 } { i8 1, i64 0 } }
| 111 | // ret { i8, i64 } { i8 1, i64 0 } |
| 112 | // } |
| 113 | Status NullLiteral::GetCodegendComputeFnImpl(LlvmCodeGen* codegen, llvm::Function** fn) { |
| 114 | DCHECK_EQ(GetNumChildren(), 0); |
| 115 | llvm::Value* args[2]; |
| 116 | *fn = CreateIrFunctionPrototype("NullLiteral", codegen, &args); |
| 117 | llvm::BasicBlock* entry_block = |
| 118 | llvm::BasicBlock::Create(codegen->context(), "entry", *fn); |
| 119 | LlvmBuilder builder(entry_block); |
| 120 | |
| 121 | llvm::Value* v = CodegenAnyVal::GetNullVal(codegen, type()); |
| 122 | builder.CreateRet(v); |
| 123 | *fn = codegen->FinalizeFunction(*fn); |
| 124 | if (UNLIKELY(*fn == nullptr)) { |
| 125 | return Status(TErrorCode::IR_VERIFY_FAILED, "NullLiteral"); |
| 126 | } |
| 127 | return Status::OK(); |
| 128 | } |
| 129 | |
| 130 | string NullLiteral::DebugString() const { |
| 131 | stringstream out; |