Esempio n. 1
0
        /// <summary>Retrieves an LLVM integer type with the same bit width as a pointer for the default address space of the target</summary>
        /// <param name="context">LLVM <see cref="Context"/> that owns the definition of the pointer type to retrieve</param>
        /// <returns>Integer type matching the bit width of a native pointer in the target's default address space</returns>
        public ITypeRef IntPtrType(Context context)
        {
            context.ValidateNotNull(nameof(context));
            LLVMTypeRef typeRef = LLVMIntPtrTypeInContext(context.ContextHandle, DataLayoutHandle);

            return(TypeRef.FromHandle(typeRef.ThrowIfInvalid( )) !);
        }