int DefineBasicType( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { if (objc != 5) { Tcl_WrongNumArgs(interp, 1, objv, "DIBuilder name sizeInBits dwarfTypeCode"); return TCL_ERROR; } DIBuilder *builder; if (GetDIBuilderFromObj(interp, objv[1], builder) != TCL_OK) return TCL_ERROR; std::string name = Tcl_GetString(objv[2]); int size, align = 0, dwarfTypeCode; if (Tcl_GetIntFromObj(interp, objv[3], &size) != TCL_OK) return TCL_ERROR; if (Tcl_GetIntFromObj(interp, objv[4], &dwarfTypeCode) != TCL_OK) return TCL_ERROR; auto val = builder->createBasicType(name, (uint64_t) size, (uint64_t) align, (unsigned) dwarfTypeCode); Tcl_SetObjResult(interp, NewMetadataObj(val, "BasicType")); return TCL_OK; }
LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef Dref, const char *Name, uint64_t SizeInBits, unsigned Encoding) { DIBuilder *D = unwrap(Dref); return wrap(D->createBasicType(Name, SizeInBits, Encoding)); }
LLVMValueRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef Dref, const char *Name, uint64_t SizeInBits, uint64_t AlignInBits, unsigned Encoding) { DIBuilder *D = unwrap(Dref); DIBasicType T = D->createBasicType(Name, SizeInBits, AlignInBits, Encoding); return wrap(T); }
LLVMValueRef DIBuilderCreateBasicType(LLVMDIBuilderRef dref, const char *name, uint64_t sizeInBits, uint64_t alignInBits, unsigned encoding) { DIBuilder *d = unwrap(dref); DIBasicType t = d->createBasicType(StringRef(name), sizeInBits, alignInBits, encoding); return wrap(t); }