public static Constant GetElementPtr(Constant value, IEnumerable <Constant> args) { var llvmArgs = InstructionBuilder.GetValidatedGEPArgs(value, args); var handle = NativeMethods.ConstGEP(value.ValueHandle, out llvmArgs[0], (uint)llvmArgs.Length); return(FromHandle <Constant>(handle)); }
public static Constant GetElementPtr(Constant value, IEnumerable <Constant> args) { value.ValidateNotNull(nameof(value)); var llvmArgs = InstructionBuilder.GetValidatedGEPArgs(value.NativeType, value, args); var handle = LLVMConstGEP(value.ValueHandle, llvmArgs, (uint)llvmArgs.Length); return(FromHandle <Constant>(handle.ThrowIfInvalid( )) !); }