Example #1
0
        public static void AssemblyInitialize(TestContext ctx)
        {
            if (ctx == null)
            {
                throw new ArgumentNullException(nameof(ctx));
            }

            LibLLVM = Library.InitializeLLVM( );
            LibLLVM.RegisterTarget(CodeGenTarget.All);
        }
Example #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);
        }