C++: Separate compiler option from CppDeclarationGenerator
This commit is contained in:
18
Il2CppInspector.Common/Cpp/CppCompiler.cs
Normal file
18
Il2CppInspector.Common/Cpp/CppCompiler.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Il2CppInspector.Cpp
|
||||
{
|
||||
public static class CppCompiler
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
BinaryFormat, // Inheritance structs use C syntax, and will automatically choose MSVC or GCC based on inferred compiler.
|
||||
MSVC, // Inheritance structs are laid out assuming the MSVC compiler, which recursively includes base classes
|
||||
GCC, // Inheritance structs are laid out assuming the GCC compiler, which packs members from all bases + current class together
|
||||
}
|
||||
|
||||
public static Type GuessFromImage(IFileFormatReader image) => (image is PEReader? Type.MSVC : Type.GCC);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user