Refactored how logging works

Made it central reusable logic. No longer needs to be passed around, opened or closed.
This commit is contained in:
Pasha Bibko
2025-05-05 23:55:22 +01:00
parent 0f11fe006b
commit 5339df9b36
22 changed files with 231 additions and 193 deletions

View File

@@ -14,7 +14,7 @@ namespace LX_Build
[LibraryImport ("Generator.dll", StringMarshalling = StringMarshalling.Custom,
StringMarshallingCustomType = typeof(System.Runtime.InteropServices.Marshalling.AnsiStringMarshaller))]
[UnmanagedCallConv(CallConvs = new Type[] { typeof(System.Runtime.CompilerServices.CallConvCdecl) })]
public static partial int GenIR(string arg1, string arg2, string? arg3);
public static partial int GenIR(string arg1, string arg2);
// Sets the directory to import the DLLs from //
public static void Init()

View File

@@ -45,7 +45,7 @@ namespace LX_Build
LX_API.Init();
// Generates LLVM IR with the example files //
if (LX_API.GenIR("example/main.lx", "example/main.ll", "example/log") != 0)
if (LX_API.GenIR("example/main.lx", "example/main.ll") != 0)
{
// Quits if the IR Generation fails //
// The C++ script handles all of the error message outputting //