本文整理汇总了C++中DIBuilder::createTypedef方法的典型用法代码示例。如果您正苦于以下问题:C++ DIBuilder::createTypedef方法的具体用法?C++ DIBuilder::createTypedef怎么用?C++ DIBuilder::createTypedef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIBuilder
的用法示例。
在下文中一共展示了DIBuilder::createTypedef方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NewMetadataObj
int
DefineAliasType(
ClientData clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
{
if (objc != 7) {
Tcl_WrongNumArgs(interp, 1, objv,
"DIBuilder type name file line contextScope");
return TCL_ERROR;
}
DIBuilder *builder;
if (GetDIBuilderFromObj(interp, objv[1], builder) != TCL_OK)
return TCL_ERROR;
DIType *type;
if (GetMetadataFromObj(interp, objv[2], "type", type) != TCL_OK)
return TCL_ERROR;
std::string name = Tcl_GetString(objv[3]);
DIFile *file;
if (GetMetadataFromObj(interp, objv[4], "file", file) != TCL_OK)
return TCL_ERROR;
int line;
if (Tcl_GetIntFromObj(interp, objv[5], &line) != TCL_OK)
return TCL_ERROR;
DIScope *context;
if (GetMetadataFromObj(interp, objv[6], "context", context) != TCL_OK)
return TCL_ERROR;
auto val = builder->createTypedef(type, name, file, line, context);
Tcl_SetObjResult(interp, NewMetadataObj(val, "AliasType"));
return TCL_OK;
}
示例2: LLVMDIBuilderCreateTypedef
LLVMValueRef LLVMDIBuilderCreateTypedef(LLVMDIBuilderRef Dref, LLVMValueRef Ty,
const char *Name, LLVMValueRef File,
unsigned Line, LLVMValueRef Context) {
DIBuilder *D = unwrap(Dref);
DIDerivedType DT =
D->createTypedef(unwrapDI<DIType>(Ty), Name, unwrapDI<DIFile>(File), Line,
unwrapDI<DIDescriptor>(Context));
return wrap(DT);
}
示例3: LLVMDIBuilderCreateTypedef
LLVMMetadataRef LLVMDIBuilderCreateTypedef(LLVMDIBuilderRef Dref,
LLVMMetadataRef Ty, const char *Name,
LLVMMetadataRef File, unsigned Line,
LLVMMetadataRef Context) {
DIBuilder *D = unwrap(Dref);
return wrap(D->createTypedef(unwrap<DIType>(Ty), Name,
File ? unwrap<DIFile>(File) : nullptr, Line,
Context ? unwrap<DIScope>(Context) : nullptr));
}
示例4: DIBuilderCreateTypedef
LLVMValueRef DIBuilderCreateTypedef(LLVMDIBuilderRef dref, LLVMValueRef diType,
const char *name, LLVMValueRef diFile,
unsigned line, LLVMValueRef diContext) {
DIBuilder *d = unwrap(dref);
DIDerivedType dt = d->createTypedef(unwrapDI<DIType>(diType), StringRef(name),
unwrapDI<DIFile>(diFile), line,
unwrapDI<DIDescriptor>(diContext));
return wrap(dt);
}