From 1286503fb7624a10ae49e8ca975473b8efecb366 Mon Sep 17 00:00:00 2001 From: Conrad Kreyling Date: Wed, 7 Feb 2024 08:56:34 -0500 Subject: [PATCH] Add ARM64 to ArchType --- src/CppParser/AST.h | 3 ++- src/CppParser/Bindings/CLI/AST.h | 3 ++- .../CSharp/arm64-apple-darwin21.4.0/CppSharp.CppParser.cs | 3 ++- .../CSharp/arm64-linux-gnu-cxx11abi/CppSharp.CppParser.cs | 3 ++- .../Bindings/CSharp/arm64-linux-gnu/CppSharp.CppParser.cs | 3 ++- .../CSharp/i686-apple-darwin21.4.0/CppSharp.CppParser.cs | 3 ++- .../Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs | 3 ++- .../CSharp/x86_64-apple-darwin21.4.0/CppSharp.CppParser.cs | 3 ++- .../CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs | 3 ++- .../Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs | 3 ++- .../Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs | 3 ++- src/CppParser/Parser.cpp | 2 ++ 12 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/CppParser/AST.h b/src/CppParser/AST.h index c8a3be1cb8..eb9d8d7bbb 100644 --- a/src/CppParser/AST.h +++ b/src/CppParser/AST.h @@ -23,7 +23,8 @@ enum class ArchType { UnknownArch, x86, - x86_64 + x86_64, + ARM64 }; class CS_API NativeLibrary diff --git a/src/CppParser/Bindings/CLI/AST.h b/src/CppParser/Bindings/CLI/AST.h index ff061581f8..d9f6ca0673 100644 --- a/src/CppParser/Bindings/CLI/AST.h +++ b/src/CppParser/Bindings/CLI/AST.h @@ -81,7 +81,8 @@ namespace CppSharp { UnknownArch = 0, X86 = 1, - X86_64 = 2 + X86_64 = 2, + ARM64 = 3, }; public ref class NativeLibrary : ICppInstance diff --git a/src/CppParser/Bindings/CSharp/arm64-apple-darwin21.4.0/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/arm64-apple-darwin21.4.0/CppSharp.CppParser.cs index 68ad095fb3..d8c04fed26 100644 --- a/src/CppParser/Bindings/CSharp/arm64-apple-darwin21.4.0/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/arm64-apple-darwin21.4.0/CppSharp.CppParser.cs @@ -57,7 +57,8 @@ public enum ArchType { UnknownArch = 0, X86 = 1, - X86_64 = 2 + X86_64 = 2, + ARM64 = 3, } public unsafe partial class NativeLibrary : IDisposable diff --git a/src/CppParser/Bindings/CSharp/arm64-linux-gnu-cxx11abi/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/arm64-linux-gnu-cxx11abi/CppSharp.CppParser.cs index 93855910f0..a3ba1689a9 100644 --- a/src/CppParser/Bindings/CSharp/arm64-linux-gnu-cxx11abi/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/arm64-linux-gnu-cxx11abi/CppSharp.CppParser.cs @@ -57,7 +57,8 @@ public enum ArchType { UnknownArch = 0, X86 = 1, - X86_64 = 2 + X86_64 = 2, + ARM64 = 3, } public unsafe partial class NativeLibrary : IDisposable diff --git a/src/CppParser/Bindings/CSharp/arm64-linux-gnu/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/arm64-linux-gnu/CppSharp.CppParser.cs index f9e3781732..3cdf67a260 100644 --- a/src/CppParser/Bindings/CSharp/arm64-linux-gnu/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/arm64-linux-gnu/CppSharp.CppParser.cs @@ -57,7 +57,8 @@ public enum ArchType { UnknownArch = 0, X86 = 1, - X86_64 = 2 + X86_64 = 2, + ARM64 = 3, } public unsafe partial class NativeLibrary : IDisposable diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin21.4.0/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/i686-apple-darwin21.4.0/CppSharp.CppParser.cs index b24d99f31d..91b761617f 100644 --- a/src/CppParser/Bindings/CSharp/i686-apple-darwin21.4.0/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin21.4.0/CppSharp.CppParser.cs @@ -57,7 +57,8 @@ public enum ArchType { UnknownArch = 0, X86 = 1, - X86_64 = 2 + X86_64 = 2, + ARM64 = 3, } public unsafe partial class NativeLibrary : IDisposable diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs index 929151367b..e146d1c403 100644 --- a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs @@ -57,7 +57,8 @@ public enum ArchType { UnknownArch = 0, X86 = 1, - X86_64 = 2 + X86_64 = 2, + ARM64 = 3, } public unsafe partial class NativeLibrary : IDisposable diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin21.4.0/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin21.4.0/CppSharp.CppParser.cs index c748a83a7a..c5e7528f7c 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin21.4.0/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin21.4.0/CppSharp.CppParser.cs @@ -57,7 +57,8 @@ public enum ArchType { UnknownArch = 0, X86 = 1, - X86_64 = 2 + X86_64 = 2, + ARM64 = 3, } public unsafe partial class NativeLibrary : IDisposable diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs index 93855910f0..a3ba1689a9 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs @@ -57,7 +57,8 @@ public enum ArchType { UnknownArch = 0, X86 = 1, - X86_64 = 2 + X86_64 = 2, + ARM64 = 3, } public unsafe partial class NativeLibrary : IDisposable diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs index f9e3781732..3cdf67a260 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs @@ -57,7 +57,8 @@ public enum ArchType { UnknownArch = 0, X86 = 1, - X86_64 = 2 + X86_64 = 2, + ARM64 = 3, } public unsafe partial class NativeLibrary : IDisposable diff --git a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs index fde849036a..132b5a0d2e 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs @@ -57,7 +57,8 @@ public enum ArchType { UnknownArch = 0, X86 = 1, - X86_64 = 2 + X86_64 = 2, + ARM64 = 3, } public unsafe partial class NativeLibrary : IDisposable diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index 1edc0850c1..b8381704df 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -4532,6 +4532,8 @@ static ArchType ConvertArchType(unsigned int archType) return ArchType::x86; case llvm::Triple::ArchType::x86_64: return ArchType::x86_64; + case llvm::Triple::ArchType::aarch64: + return ArchType::ARM64; } return ArchType::UnknownArch; }