本文整理汇总了C++中DIBuilder::insertDbgValueIntrinsic方法的典型用法代码示例。如果您正苦于以下问题:C++ DIBuilder::insertDbgValueIntrinsic方法的具体用法?C++ DIBuilder::insertDbgValueIntrinsic怎么用?C++ DIBuilder::insertDbgValueIntrinsic使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIBuilder
的用法示例。
在下文中一共展示了DIBuilder::insertDbgValueIntrinsic方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LLVMDIBuilderInsertValueAtEnd
LLVMValueRef LLVMDIBuilderInsertValueAtEnd(LLVMDIBuilderRef Dref,
LLVMValueRef Val, uint64_t Offset,
LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr,
LLVMBasicBlockRef Block) {
DIBuilder *D = unwrap(Dref);
Instruction *Instr = D->insertDbgValueIntrinsic(
unwrap(Val), Offset, unwrapDI<DIVariable>(VarInfo),
unwrapDI<DIExpression>(Expr), unwrap(Block));
return wrap(Instr);
}
示例2: LLVMDIBuilderInsertValueAtEnd
LLVMValueRef LLVMDIBuilderInsertValueAtEnd(LLVMDIBuilderRef Dref,
LLVMValueRef Val, uint64_t Offset,
LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr,
LLVMBasicBlockRef Block) {
// Fail immediately here until the llgo folks update their bindings. The
// called function is going to assert out anyway.
llvm_unreachable("DIBuilder API change requires a DebugLoc");
DIBuilder *D = unwrap(Dref);
Instruction *Instr = D->insertDbgValueIntrinsic(
unwrap(Val), Offset, unwrap<DILocalVariable>(VarInfo),
unwrap<DIExpression>(Expr), /* DebugLoc */ nullptr, unwrap(Block));
return wrap(Instr);
}
示例3: LLVMDIBuilderInsertValueAtEnd
LLVMValueRef LLVMDIBuilderInsertValueAtEnd(
LLVMDIBuilderRef D,
LLVMValueRef Val,
uint64_t Offset,
LLVMValueRef VarInfo,
LLVMBasicBlockRef Block)
{
DIBuilder *db = unwrap(D);
Instruction *Instr = db->insertDbgValueIntrinsic(
unwrap(Val),
Offset,
unwrapDI<DIVariable>(VarInfo),
unwrap(Block));
return wrap(Instr);
}
示例4: NewValueObj
int
BuildDbgValue(
ClientData clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
{
if (objc != 6) {
Tcl_WrongNumArgs(interp, 1, objv,
"dibuilder builder value location variableInfo");
return TCL_ERROR;
}
DIBuilder *builder;
if (GetDIBuilderFromObj(interp, objv[1], builder) != TCL_OK)
return TCL_ERROR;
IRBuilder<> *b;
if (GetBuilderFromObj(interp, objv[2], b) != TCL_OK)
return TCL_ERROR;
Value *val;
if (GetValueFromObj(interp, objv[3], val) != TCL_OK)
return TCL_ERROR;
DILocation *location;
if (GetMetadataFromObj(interp, objv[4], "location", location) != TCL_OK)
return TCL_ERROR;
DILocalVariable *varInfo;
if (GetMetadataFromObj(interp, objv[5], "variable", varInfo) != TCL_OK)
return TCL_ERROR;
auto expr = builder->createExpression(); // Dummy
auto inst = builder->insertDbgValueIntrinsic(val, 0, varInfo, expr,
location, b->GetInsertBlock());
Tcl_SetObjResult(interp, NewValueObj(inst));
return TCL_OK;
}