dotnet / LLVMSharp

LLVM bindings for .NET Standard written in C# using ClangSharp
MIT License
844 stars 97 forks source link

Fix #178 #179

Closed ryan-moreno closed 2 years ago

ryan-moreno commented 3 years ago

Fixes the bug where the LLVMModuleFlagBehavior enum values are all off by 1 (https://github.com/microsoft/LLVMSharp/issues/178#issue-1051246758). Also creates a unit test to make sure that the enums aren't off by 1 by checking that LLVM.ModuleFlagBehaviorWarning doesn't cause an Error (which does happen in the existing version of LLVMSharp). There is a comment at the bottom of the unit test describing a way to improve the test if someone else knows how to implement this.