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

            LLVM.VerifyModule(mod, action, out error);
            Console.WriteLine(StringifyMessage(error));
        }
Esempio n. 2
0
 public void Verify(LLVMVerifierFailureAction Action)
 {
     if (!TryVerify(Action, out string Message))
     {
         throw new ExternalException(Message);
     }
 }
Esempio 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);
        }
Esempio 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);
        }
 public static extern int VerifyFunction(LLVMValueRef* Fn, LLVMVerifierFailureAction Action);
 public static extern int VerifyModule(LLVMModuleRef* M, LLVMVerifierFailureAction Action, [MarshalAs(UnmanagedType.LPStr)] ref StringBuilder OutMessage);
Esempio n. 7
0
 public bool Verify(LLVMVerifierFailureAction failureAction)
 {
     // Verify the function.
     return(LLVM.VerifyFunction(this.reference, failureAction).Value == 1);
 }
Esempio n. 8
0
 public bool VerifyFunction(LLVMVerifierFailureAction @Action)
 {
     return(LLVM.VerifyFunction(this, @Action));
 }
Esempio n. 9
0
 public bool VerifyModule(LLVMVerifierFailureAction @Action, out IntPtr @OutMessage)
 {
     return(LLVM.VerifyModule(this.instance, @Action, out @OutMessage));
 }
Esempio n. 10
0
 public bool Validate(LLVMVerifierFailureAction failureAction)
 {
     return(Native.VerifyFunction(m_handle, failureAction) != 0);
 }
Esempio n. 11
0
 public static extern LLVMBool VerifyFunction(LLVMValueRef @Fn, LLVMVerifierFailureAction @Action);
Esempio n. 12
0
 public bool VerifyFunction(LLVMVerifierFailureAction @Action)
 {
     return LLVM.VerifyFunction(this, @Action);
 }
Esempio n. 13
0
 internal static extern LLVMStatus LLVMVerifyFunctionEx(LLVMValueRef @Fn, LLVMVerifierFailureAction @Action, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(StringMarshaler), MarshalCookie = "DisposeMessage")] out string @OutMessages);
Esempio n. 14
0
 public bool VerifyModule(LLVMVerifierFailureAction @Action, out IntPtr @OutMessage)
 {
     return LLVM.VerifyModule(this.instance, @Action, out @OutMessage);
 }
Esempio n. 15
0
 public bool Validate(LLVMVerifierFailureAction failureAction)
 {
     return Native.VerifyFunction(m_handle, failureAction) != 0;
 }
Esempio n. 16
0
 public static extern LLVMBool VerifyModule(LLVMModuleRef @M, LLVMVerifierFailureAction @Action, out IntPtr @OutMessage);
Esempio n. 17
0
 public static bool VerifyModule(this Module self, LLVMVerifierFailureAction Action, out string OutMessage)
 {
     return(LLVM.VerifyModule(self.GetModuleRef(), Action, out OutMessage));
 }