Exemplo n.º 1
0
int
DefinePointerType(
    ClientData clientData,
    Tcl_Interp *interp,
    int objc,
    Tcl_Obj *const objv[])
{
    if (objc != 3) {
	Tcl_WrongNumArgs(interp, 1, objv, "DIBuilder pointee");
	return TCL_ERROR;
    }

    DIBuilder *builder;
    if (GetDIBuilderFromObj(interp, objv[1], builder) != TCL_OK)
	return TCL_ERROR;
    DIType *pointee;
    if (GetMetadataFromObj(interp, objv[2], "type", pointee) != TCL_OK)
	return TCL_ERROR;
    size_t size = sizeof(pointee) * 8;

    auto val = builder->createPointerType(pointee, size);

    Tcl_SetObjResult(interp, NewMetadataObj(val, "PointerType"));
    return TCL_OK;
}
Exemplo n.º 2
0
LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef Dref,
                                               LLVMMetadataRef PointeeType,
                                               uint64_t SizeInBits,
                                               uint32_t AlignInBits,
                                               const char *Name) {
  DIBuilder *D = unwrap(Dref);
  return wrap(D->createPointerType(unwrap<DIType>(PointeeType), SizeInBits,
                                   AlignInBits, Name));
}
Exemplo n.º 3
0
LLVMValueRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef Dref,
                                            LLVMValueRef PointeeType,
                                            uint64_t SizeInBits,
                                            uint64_t AlignInBits,
                                            const char *Name) {
  DIBuilder *D = unwrap(Dref);
  DIDerivedType T = D->createPointerType(unwrapDI<DIType>(PointeeType),
                                         SizeInBits, AlignInBits, Name);
  return wrap(T);
}
Exemplo n.º 4
0
LLVMValueRef DIBuilderCreatePointerType(LLVMDIBuilderRef dref,
                                        LLVMValueRef pointeeType,
                                        uint64_t sizeInBits,
                                        uint64_t alignInBits,
                                        const char *name) {
  DIBuilder *d = unwrap(dref);
  DIDerivedType t = d->createPointerType(
      unwrapDI<DIType>(pointeeType), sizeInBits, alignInBits, StringRef(name));
  return wrap(t);
}