提交 2043d95b 编写于 作者: N Nikos Armenatzoglou

Use string messages in codegened slot_getattr fallback block

上级 5d0a96fd
......@@ -662,15 +662,15 @@ bool SlotGetAttrCodegen::GenerateSlotGetAttr(
// Note: We collect error code information, based on the block from which we
// fall back, and log it for debugging purposes.
irb->SetInsertPoint(fallback_block);
llvm::PHINode* llvm_error = irb->CreatePHI(codegen_utils->GetType<int>(), 4);
llvm_error->addIncoming(codegen_utils->GetConstant(0),
llvm::PHINode* llvm_error = irb->CreatePHI(codegen_utils->GetType<char *>(), 2);
llvm_error->addIncoming(codegen_utils->GetConstant("slot check failed"),
slot_check_block);
llvm_error->addIncoming(codegen_utils->GetConstant(1),
llvm_error->addIncoming(codegen_utils->GetConstant("tuple check failed"),
heap_tuple_check_block);
codegen_utils->CreateElog(
DEBUG1,
"Falling back to regular slot_getattr, reason = %d",
"Falling back to regular slot_getattr, reason = %s",
llvm_error);
codegen_utils->CreateFallback<SlotGetAttrFn>(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册