Exemplo n.º 1
0
        public static void VerifyModule(LLVMModuleRef mod, LLVMVerifierFailureAction action)
        {
            IntPtr error;

            LLVM.VerifyModule(mod, action, out error);
            Console.WriteLine(StringifyMessage(error));
        }
Exemplo n.º 2
0
 public void Verify(LLVMVerifierFailureAction Action)
 {
     if (!TryVerify(Action, out string Message))
     {
         throw new ExternalException(Message);
     }
 }
Exemplo n.º 3
0
        public static LLVMBool VerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action, out string OutMessage)
        {
            var retVal = VerifyModule(M, Action, out IntPtr message);

            OutMessage = message != IntPtr.Zero && retVal.Value != 0 ? Marshal.PtrToStringAnsi(message) : null;
            DisposeMessage(message);
            return(retVal);
        }
Exemplo n.º 4
0
        public bool TryVerify(LLVMVerifierFailureAction Action, out string OutMessage)
        {
            sbyte *pMessage = null;
            var    result   = LLVM.VerifyModule(this, Action, &pMessage);

            if (pMessage == null)
            {
                OutMessage = string.Empty;
            }
            else
            {
                var span = new ReadOnlySpan <byte>(pMessage, int.MaxValue);
                OutMessage = span.Slice(0, span.IndexOf((byte)'\0')).AsString();
            }

            return(result == 0);
        }
Exemplo n.º 5
0
 public static extern int VerifyFunction(LLVMValueRef* Fn, LLVMVerifierFailureAction Action);
Exemplo n.º 6
0
 public static extern int VerifyModule(LLVMModuleRef* M, LLVMVerifierFailureAction Action, [MarshalAs(UnmanagedType.LPStr)] ref StringBuilder OutMessage);
Exemplo n.º 7
0
 public bool Verify(LLVMVerifierFailureAction failureAction)
 {
     // Verify the function.
     return(LLVM.VerifyFunction(this.reference, failureAction).Value == 1);
 }
Exemplo n.º 8
0
 public bool VerifyFunction(LLVMVerifierFailureAction @Action)
 {
     return(LLVM.VerifyFunction(this, @Action));
 }
Exemplo n.º 9
0
 public bool VerifyModule(LLVMVerifierFailureAction @Action, out IntPtr @OutMessage)
 {
     return(LLVM.VerifyModule(this.instance, @Action, out @OutMessage));
 }
Exemplo n.º 10
0
 public bool Validate(LLVMVerifierFailureAction failureAction)
 {
     return(Native.VerifyFunction(m_handle, failureAction) != 0);
 }
Exemplo n.º 11
0
 public static extern LLVMBool VerifyFunction(LLVMValueRef @Fn, LLVMVerifierFailureAction @Action);
Exemplo n.º 12
0
 public bool VerifyFunction(LLVMVerifierFailureAction @Action)
 {
     return LLVM.VerifyFunction(this, @Action);
 }
Exemplo n.º 13
0
 internal static extern LLVMStatus LLVMVerifyFunctionEx(LLVMValueRef @Fn, LLVMVerifierFailureAction @Action, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(StringMarshaler), MarshalCookie = "DisposeMessage")] out string @OutMessages);
Exemplo n.º 14
0
 public bool VerifyModule(LLVMVerifierFailureAction @Action, out IntPtr @OutMessage)
 {
     return LLVM.VerifyModule(this.instance, @Action, out @OutMessage);
 }
Exemplo n.º 15
0
 public bool Validate(LLVMVerifierFailureAction failureAction)
 {
     return Native.VerifyFunction(m_handle, failureAction) != 0;
 }
Exemplo n.º 16
0
 public static extern LLVMBool VerifyModule(LLVMModuleRef @M, LLVMVerifierFailureAction @Action, out IntPtr @OutMessage);
Exemplo n.º 17
0
 public static bool VerifyModule(this Module self, LLVMVerifierFailureAction Action, out string OutMessage)
 {
     return(LLVM.VerifyModule(self.GetModuleRef(), Action, out OutMessage));
 }