当前位置: 首页>>代码示例>>C++>>正文


C++ DIBuilder::getOrCreateArray方法代码示例

本文整理汇总了C++中DIBuilder::getOrCreateArray方法的典型用法代码示例。如果您正苦于以下问题:C++ DIBuilder::getOrCreateArray方法的具体用法?C++ DIBuilder::getOrCreateArray怎么用?C++ DIBuilder::getOrCreateArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DIBuilder的用法示例。


在下文中一共展示了DIBuilder::getOrCreateArray方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: LLVMDIBuilderGetOrCreateArray

LLVMValueRef LLVMDIBuilderGetOrCreateArray(LLVMDIBuilderRef Dref,
                                           LLVMValueRef *Data, size_t Length) {
  DIBuilder *D = unwrap(Dref);
  Value **DataValue = unwrap(Data);
  ArrayRef<Value *> Elements(DataValue, Length);
  DIArray A = D->getOrCreateArray(Elements);
  return wrap(A);
}
开发者ID:Drup,项目名称:llvm,代码行数:8,代码来源:DIBuilderBindings.cpp

示例2: DIBuilderGetOrCreateArray

LLVMValueRef DIBuilderGetOrCreateArray(LLVMDIBuilderRef dref,
                                       LLVMValueRef *data, size_t length) {
  DIBuilder *d = unwrap(dref);
  Value **dataValue = unwrap(data);
  ArrayRef<Value *> elements(dataValue, length);
  DIArray a = d->getOrCreateArray(elements);
  return wrap(a);
}
开发者ID:go-llvm,项目名称:llvm,代码行数:8,代码来源:dibuilder.cpp

示例3: LLVMDIBuilderGetOrCreateArray

LLVMMetadataRef LLVMDIBuilderGetOrCreateArray(LLVMDIBuilderRef Dref,
                                              LLVMMetadataRef *Data,
                                              size_t Length) {
  DIBuilder *D = unwrap(Dref);
  Metadata **DataValue = unwrap(Data);
  ArrayRef<Metadata *> Elements(DataValue, Length);
  DINodeArray A = D->getOrCreateArray(Elements);
  return wrap(A.get());
}
开发者ID:1995hnagamin,项目名称:llvm,代码行数:9,代码来源:DIBuilderBindings.cpp

示例4: LLVMDIBuilderGetOrCreateArray

LLVMValueRef LLVMDIBuilderGetOrCreateArray(
  LLVMDIBuilderRef D,
  LLVMValueRef *Data,
  size_t Length)
{
  DIBuilder *db = unwrap(D);
  ArrayRef<Value *> DataList(unwrap(Data), Length);
  DIArray A = db->getOrCreateArray(DataList);
  return wrap(A);
}
开发者ID:RodneyBates,项目名称:M3Devel,代码行数:10,代码来源:DIBuilderBindings.cpp

示例5: NewMetadataObj

int
DefineStructType(
    ClientData clientData,
    Tcl_Interp *interp,
    int objc,
    Tcl_Obj *const objv[])
{
    if (objc < 7) {
	Tcl_WrongNumArgs(interp, 1, objv,
		"DIBuilder scope name file line size element...");
	return TCL_ERROR;
    }

    DIBuilder *builder;
    if (GetDIBuilderFromObj(interp, objv[1], builder) != TCL_OK)
	return TCL_ERROR;
    DIScope *scope;
    if (GetMetadataFromObj(interp, objv[2], "scope", scope) != 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;
    unsigned flags = 0, align = 0;
    int size, line;
    if (Tcl_GetIntFromObj(interp, objv[5], &line) != TCL_OK)
	return TCL_ERROR;
    if (Tcl_GetIntFromObj(interp, objv[6], &size) != TCL_OK)
	return TCL_ERROR;
    std::vector<Metadata *> elements;
    for (int i=7 ; i<objc ; i++) {
	DIType *type;
	if (GetMetadataFromObj(interp, objv[i], "type", type) != TCL_OK)
	    return TCL_ERROR;
	elements.push_back(type);
    }

    auto val = builder->createStructType(scope, name, file, (unsigned) line,
	    (uint64_t) size, align, flags, nullptr,
	    builder->getOrCreateArray(elements));

    Tcl_SetObjResult(interp, NewMetadataObj(val, "StructType"));
    return TCL_OK;
}
开发者ID:jdc8,项目名称:llvmtcl,代码行数:44,代码来源:debuginfo.cpp


注:本文中的DIBuilder::getOrCreateArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。