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


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

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


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

示例1:

void*
mono_llvm_di_create_compile_unit (void *di_builder, const char *cu_name, const char *dir, const char *producer)
{
	DIBuilder *builder = (DIBuilder*)di_builder;

	return builder->createCompileUnit (dwarf::DW_LANG_C99, cu_name, dir, producer, true, "", 0);
}
开发者ID:TheMetalMage,项目名称:mono,代码行数:7,代码来源:mini-llvm-cpp.cpp

示例2: NewMetadataObj

int
DefineCompileUnit(
    ClientData clientData,
    Tcl_Interp *interp,
    int objc,
    Tcl_Obj *const objv[])
{
    if (objc != 5) {
	Tcl_WrongNumArgs(interp, 1, objv,
		"DIBuilder file directory producer");
	return TCL_ERROR;
    }

    DIBuilder *builder;
    if (GetDIBuilderFromObj(interp, objv[1], builder) != TCL_OK)
	return TCL_ERROR;
    unsigned lang = dwarf::DW_LANG_lo_user;//No standard value for Tcl!
    std::string file = Tcl_GetString(objv[2]);
    std::string dir = Tcl_GetString(objv[3]);
    std::string producer = Tcl_GetString(objv[4]);
    std::string flags = "";
    unsigned runtimeVersion = 0;

    auto val = builder->createCompileUnit(lang, file, dir, producer, true,
	    flags, runtimeVersion);

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

示例3: LLVMDIBuilderCreateCompileUnit

LLVMValueRef LLVMDIBuilderCreateCompileUnit(
  LLVMDIBuilderRef D,
  unsigned Lang,
  const char *File,
  const char *Dir,
  const char *Producer,
  bool Optimized,
  const char *Flags,
  unsigned RuntimeVersion)
{
  DIBuilder *db = unwrap(D);
  DICompileUnit CU = db->createCompileUnit(
    Lang,
    File,
    Dir,
    Producer,
    Optimized,
    Flags,
    RuntimeVersion);
    return wrap(CU);

  //LLVMValueRef val;
  // return reinterpret_cast<LLVMValueRef>(&CU);
//    return reinterpret_cast<LLVMValueRef>(const_cast<DICompileUnit*>(CU));

}
开发者ID:RodneyBates,项目名称:M3Devel,代码行数:26,代码来源:DIBuilderBindings.cpp

示例4: LLVMDIBuilderCreateCompileUnit

LLVMMetadataRef LLVMDIBuilderCreateCompileUnit(LLVMDIBuilderRef Dref,
                                               unsigned Lang, const char *File,
                                               const char *Dir,
                                               const char *Producer,
                                               int Optimized, const char *Flags,
                                               unsigned RuntimeVersion) {
  DIBuilder *D = unwrap(Dref);
  return wrap(D->createCompileUnit(Lang, D->createFile(File, Dir), Producer,
                                   Optimized, Flags, RuntimeVersion));
}
开发者ID:1995hnagamin,项目名称:llvm,代码行数:10,代码来源:DIBuilderBindings.cpp

示例5: LLVMDIBuilderCreateCompileUnit

LLVMValueRef LLVMDIBuilderCreateCompileUnit(LLVMDIBuilderRef Dref,
                                            unsigned Lang, const char *File,
                                            const char *Dir,
                                            const char *Producer, int Optimized,
                                            const char *Flags,
                                            unsigned RuntimeVersion) {
  DIBuilder *D = unwrap(Dref);
  DICompileUnit CU = D->createCompileUnit(Lang, File, Dir, Producer, Optimized,
                                          Flags, RuntimeVersion);
  return wrap(CU);
}
开发者ID:Drup,项目名称:llvm,代码行数:11,代码来源:DIBuilderBindings.cpp

示例6: DIBuilderCreateCompileUnit

LLVMValueRef DIBuilderCreateCompileUnit(LLVMDIBuilderRef dref, unsigned lang,
                                        const char *file, const char *dir,
                                        const char *producer, int optimized,
                                        const char *flags,
                                        unsigned runtimeVersion) {
  DIBuilder *d = unwrap(dref);
  DICompileUnit cu = d->createCompileUnit(lang, StringRef(file), StringRef(dir),
                                          StringRef(producer), optimized,
                                          StringRef(flags), runtimeVersion);
  return wrap(cu);
}
开发者ID:go-llvm,项目名称:llvm,代码行数:11,代码来源:dibuilder.cpp

示例7: CU

    CopyConnectedComponent(Module * dest_, Module * src_, llvmutil_Property copyGlobal_, void * data_, ValueToValueMapTy & VMap_)
    : dest(dest_), src(src_), copyGlobal(copyGlobal_), data(data_), VMap(VMap_), DI(NULL) {
        if(NamedMDNode * NMD = src->getNamedMetadata("llvm.module.flags")) {
            NamedMDNode * New = dest->getOrInsertNamedMetadata(NMD->getName());
            for (unsigned i = 0; i < NMD->getNumOperands(); i++) {
                New->addOperand(MapValue(NMD->getOperand(i), VMap));
            }
        }

        if(NamedMDNode * CUN = src->getNamedMetadata("llvm.dbg.cu")) {
            DI = new DIBuilder(*dest);
            DICompileUnit CU(CUN->getOperand(0));
            NCU = DI->createCompileUnit(CU.getLanguage(), CU.getFilename(), CU.getDirectory(), CU.getProducer(), CU.isOptimized(), CU.getFlags(), CU.getRunTimeVersion());
        }
    }
开发者ID:0----0,项目名称:terra,代码行数:15,代码来源:tllvmutil.cpp


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