Exemplo n.º 1
0
        public static void AssemblyInitialize(TestContext ctx)
        {
            if (ctx == null)
            {
                throw new ArgumentNullException(nameof(ctx));
            }

            LibLLVM = Library.InitializeLLVM( );
            LibLLVM.RegisterTarget(CodeGenTarget.All);
        }
Exemplo n.º 2
0
        public static void AssemblyInitialize(TestContext ctx)
        {
            if (ctx == null)
            {
                throw new ArgumentNullException(nameof(ctx));
            }

            // LLVM really doesn't like being re-initialized in the same module
            // the LLVM-C un-init seems to undo things more aggressively than the init
            // does. (e.g. it wipes out things assumed init via static construction so
            // they are not re-initialized [Not verified, but that would explain the behavior]
            LibLLVM = Library.InitializeLLVM( );
            LibLLVM.RegisterTarget(CodeGenTarget.Native);
        }
Exemplo n.º 3
0
 public static void AssemblyCleanup( )
 {
     LibLLVM?.Dispose( );
 }