本文整理汇总了C++中DIBuilder::createSubroutineType方法的典型用法代码示例。如果您正苦于以下问题:C++ DIBuilder::createSubroutineType方法的具体用法?C++ DIBuilder::createSubroutineType怎么用?C++ DIBuilder::createSubroutineType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIBuilder
的用法示例。
在下文中一共展示了DIBuilder::createSubroutineType方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NewMetadataObj
int
DefineFunctionType(
ClientData clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
{
if (objc < 4) {
Tcl_WrongNumArgs(interp, 1, objv,
"DIBuilder file returnType argumentType...");
return TCL_ERROR;
}
DIBuilder *builder;
if (GetDIBuilderFromObj(interp, objv[1], builder) != TCL_OK)
return TCL_ERROR;
DIFile *file;
if (GetMetadataFromObj(interp, objv[2], "file", file) != TCL_OK)
return TCL_ERROR;
std::vector<Metadata *> elements;
for (int i=3 ; i<objc ; i++) {
DIType *type;
if (GetMetadataFromObj(interp, objv[i], "type", type) != TCL_OK)
return TCL_ERROR;
elements.push_back(type);
}
auto val = builder->createSubroutineType(file,
builder->getOrCreateTypeArray(elements));
Tcl_SetObjResult(interp, NewMetadataObj(val, "FunctionType"));
return TCL_OK;
}
示例2: wrap
LLVMMetadataRef
LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef Dref, LLVMMetadataRef File,
LLVMMetadataRef ParameterTypes) {
DIBuilder *D = unwrap(Dref);
return wrap(
D->createSubroutineType(DITypeRefArray(unwrap<MDTuple>(ParameterTypes))));
}
示例3: LLVMDIBuilderCreateSubroutineType
LLVMValueRef LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef Dref,
LLVMValueRef File,
LLVMValueRef ParameterTypes) {
DIBuilder *D = unwrap(Dref);
DICompositeType CT = D->createSubroutineType(
unwrapDI<DIFile>(File), unwrapDI<DITypeArray>(ParameterTypes));
return wrap(CT);
}
示例4: DIBuilderCreateSubroutineType
LLVMValueRef DIBuilderCreateSubroutineType(LLVMDIBuilderRef dref,
LLVMValueRef diFile,
LLVMValueRef diParameterTypes) {
DIBuilder *d = unwrap(dref);
DICompositeType ct = d->createSubroutineType(
unwrapDI<DIFile>(diFile), unwrapDI<DITypeArray>(diParameterTypes));
return wrap(ct);
}
示例5: wrap
LLVMMetadataRef
LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef Dref, LLVMMetadataRef File,
LLVMMetadataRef ParameterTypes) {
DIBuilder *D = unwrap(Dref);
DICompositeType CT =
D->createSubroutineType(File ? unwrap<MDFile>(File) : nullptr,
DITypeArray(unwrap<MDTuple>(ParameterTypes)));
return wrap(CT);
}
示例6:
void*
mono_llvm_di_create_function (void *di_builder, void *cu, const char *name, const char *mangled_name, const char *dir, const char *file, int line)
{
DIBuilder *builder = (DIBuilder*)di_builder;
DIFile *di_file;
DISubroutineType *type;
// FIXME: Share DIFile
di_file = builder->createFile (file, dir);
type = builder->createSubroutineType (builder->getOrCreateTypeArray (ArrayRef<Metadata*> ()));
return builder->createFunction (di_file, name, mangled_name, di_file, line, type, true, true, 0);
}
示例7:
LLVMZigDIType *LLVMZigCreateSubroutineType(LLVMZigDIBuilder *dibuilder_wrapped,
LLVMZigDIFile *file, LLVMZigDIType **types_array, int types_array_len, unsigned flags)
{
SmallVector<Metadata *, 8> types;
for (int i = 0; i < types_array_len; i += 1) {
DIType *ditype = reinterpret_cast<DIType*>(types_array[i]);
types.push_back(ditype);
}
DIBuilder *dibuilder = reinterpret_cast<DIBuilder*>(dibuilder_wrapped);
DISubroutineType *subroutine_type = dibuilder->createSubroutineType(
reinterpret_cast<DIFile*>(file),
dibuilder->getOrCreateTypeArray(types),
flags);
DIType *ditype = subroutine_type;
return reinterpret_cast<LLVMZigDIType*>(ditype);
}
示例8:
void*
mono_llvm_di_create_function (void *di_builder, void *cu, LLVMValueRef func, const char *name, const char *mangled_name, const char *dir, const char *file, int line)
{
DIBuilder *builder = (DIBuilder*)di_builder;
DIFile *di_file;
DISubroutineType *type;
DISubprogram *di_func;
// FIXME: Share DIFile
di_file = builder->createFile (file, dir);
type = builder->createSubroutineType (builder->getOrCreateTypeArray (ArrayRef<Metadata*> ()));
di_func = builder->createFunction (di_file, name, mangled_name, di_file, line, type, true, true, 0);
unwrap<Function>(func)->setMetadata ("dbg", di_func);
return di_func;
}