diff --git a/src/CppParser/Bindings/CLI/CppParser.h b/src/CppParser/Bindings/CLI/CppParser.h index 5f1be90b..127c486b 100644 --- a/src/CppParser/Bindings/CLI/CppParser.h +++ b/src/CppParser/Bindings/CLI/CppParser.h @@ -18,7 +18,6 @@ namespace CppSharp enum struct SourceLocationKind; ref class ClangParser; ref class CppParserOptions; - ref class Parser; ref class ParserDiagnostic; ref class ParserResult; ref class ParserTargetInfo; diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs index bfa3c092..d96cdcf6 100644 --- a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs @@ -17899,53 +17899,6 @@ namespace CppSharp User = 4 } - public unsafe partial class Parser - { - [StructLayout(LayoutKind.Explicit, Size = 0)] - public partial struct __Internal - { - } - - public global::System.IntPtr __Instance { get; protected set; } - - protected int __PointerAdjustment; - internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary(); - protected void*[] __OriginalVTables; - - protected bool __ownsNativeInstance; - - internal static global::CppSharp.Parser.Parser __CreateInstance(global::System.IntPtr native, bool skipVTables = false) - { - return new global::CppSharp.Parser.Parser(native.ToPointer(), skipVTables); - } - - internal static global::CppSharp.Parser.Parser __CreateInstance(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false) - { - return new global::CppSharp.Parser.Parser(native, skipVTables); - } - - private static void* __CopyValue(global::CppSharp.Parser.Parser.__Internal native) - { - var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.Parser.__Internal)); - *(global::CppSharp.Parser.Parser.__Internal*) ret = native; - return ret.ToPointer(); - } - - private Parser(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false) - : this(__CopyValue(native), skipVTables) - { - __ownsNativeInstance = true; - NativeToManagedMap[__Instance] = this; - } - - protected Parser(void* native, bool skipVTables = false) - { - if (native == null) - return; - __Instance = new global::System.IntPtr(native); - } - } - public unsafe partial class CppParserOptions : IDisposable { [StructLayout(LayoutKind.Explicit, Size = 152)] @@ -18819,7 +18772,7 @@ namespace CppSharp public unsafe partial class ParserResult : IDisposable { - [StructLayout(LayoutKind.Explicit, Size = 28)] + [StructLayout(LayoutKind.Explicit, Size = 24)] public partial struct __Internal { [FieldOffset(0)] @@ -18834,9 +18787,6 @@ namespace CppSharp [FieldOffset(20)] internal global::System.IntPtr library; - [FieldOffset(24)] - internal global::System.IntPtr codeParser; - [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser12ParserResultC2Ev")] @@ -19018,24 +18968,6 @@ namespace CppSharp } } - public global::CppSharp.Parser.Parser CodeParser - { - get - { - global::CppSharp.Parser.Parser __result0; - if (((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser == IntPtr.Zero) __result0 = null; - else if (global::CppSharp.Parser.Parser.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser)) - __result0 = (global::CppSharp.Parser.Parser) global::CppSharp.Parser.Parser.NativeToManagedMap[((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser]; - else __result0 = global::CppSharp.Parser.Parser.__CreateInstance(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser); - return __result0; - } - - set - { - ((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance; - } - } - public uint DiagnosticsCount { get 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 026edbbc..62a17010 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 @@ -17899,53 +17899,6 @@ namespace CppSharp User = 4 } - public unsafe partial class Parser - { - [StructLayout(LayoutKind.Explicit, Size = 0)] - public partial struct __Internal - { - } - - public global::System.IntPtr __Instance { get; protected set; } - - protected int __PointerAdjustment; - internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary(); - protected void*[] __OriginalVTables; - - protected bool __ownsNativeInstance; - - internal static global::CppSharp.Parser.Parser __CreateInstance(global::System.IntPtr native, bool skipVTables = false) - { - return new global::CppSharp.Parser.Parser(native.ToPointer(), skipVTables); - } - - internal static global::CppSharp.Parser.Parser __CreateInstance(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false) - { - return new global::CppSharp.Parser.Parser(native, skipVTables); - } - - private static void* __CopyValue(global::CppSharp.Parser.Parser.__Internal native) - { - var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.Parser.__Internal)); - *(global::CppSharp.Parser.Parser.__Internal*) ret = native; - return ret.ToPointer(); - } - - private Parser(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false) - : this(__CopyValue(native), skipVTables) - { - __ownsNativeInstance = true; - NativeToManagedMap[__Instance] = this; - } - - protected Parser(void* native, bool skipVTables = false) - { - if (native == null) - return; - __Instance = new global::System.IntPtr(native); - } - } - public unsafe partial class CppParserOptions : IDisposable { [StructLayout(LayoutKind.Explicit, Size = 188)] @@ -18819,7 +18772,7 @@ namespace CppSharp public unsafe partial class ParserResult : IDisposable { - [StructLayout(LayoutKind.Explicit, Size = 28)] + [StructLayout(LayoutKind.Explicit, Size = 24)] public partial struct __Internal { [FieldOffset(0)] @@ -18834,9 +18787,6 @@ namespace CppSharp [FieldOffset(20)] internal global::System.IntPtr library; - [FieldOffset(24)] - internal global::System.IntPtr codeParser; - [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall, EntryPoint="??0ParserResult@CppParser@CppSharp@@QAE@XZ")] @@ -19018,24 +18968,6 @@ namespace CppSharp } } - public global::CppSharp.Parser.Parser CodeParser - { - get - { - global::CppSharp.Parser.Parser __result0; - if (((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser == IntPtr.Zero) __result0 = null; - else if (global::CppSharp.Parser.Parser.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser)) - __result0 = (global::CppSharp.Parser.Parser) global::CppSharp.Parser.Parser.NativeToManagedMap[((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser]; - else __result0 = global::CppSharp.Parser.Parser.__CreateInstance(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser); - return __result0; - } - - set - { - ((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance; - } - } - public uint DiagnosticsCount { get diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs index aadfb8bd..8b1f98b5 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs @@ -17898,53 +17898,6 @@ namespace CppSharp User = 4 } - public unsafe partial class Parser - { - [StructLayout(LayoutKind.Explicit, Size = 0)] - public partial struct __Internal - { - } - - public global::System.IntPtr __Instance { get; protected set; } - - protected int __PointerAdjustment; - internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary(); - protected void*[] __OriginalVTables; - - protected bool __ownsNativeInstance; - - internal static global::CppSharp.Parser.Parser __CreateInstance(global::System.IntPtr native, bool skipVTables = false) - { - return new global::CppSharp.Parser.Parser(native.ToPointer(), skipVTables); - } - - internal static global::CppSharp.Parser.Parser __CreateInstance(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false) - { - return new global::CppSharp.Parser.Parser(native, skipVTables); - } - - private static void* __CopyValue(global::CppSharp.Parser.Parser.__Internal native) - { - var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.Parser.__Internal)); - *(global::CppSharp.Parser.Parser.__Internal*) ret = native; - return ret.ToPointer(); - } - - private Parser(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false) - : this(__CopyValue(native), skipVTables) - { - __ownsNativeInstance = true; - NativeToManagedMap[__Instance] = this; - } - - protected Parser(void* native, bool skipVTables = false) - { - if (native == null) - return; - __Instance = new global::System.IntPtr(native); - } - } - public unsafe partial class CppParserOptions : IDisposable { [StructLayout(LayoutKind.Explicit, Size = 296)] @@ -18818,7 +18771,7 @@ namespace CppSharp public unsafe partial class ParserResult : IDisposable { - [StructLayout(LayoutKind.Explicit, Size = 56)] + [StructLayout(LayoutKind.Explicit, Size = 48)] public partial struct __Internal { [FieldOffset(0)] @@ -18833,9 +18786,6 @@ namespace CppSharp [FieldOffset(40)] internal global::System.IntPtr library; - [FieldOffset(48)] - internal global::System.IntPtr codeParser; - [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser12ParserResultC2Ev")] @@ -19017,24 +18967,6 @@ namespace CppSharp } } - public global::CppSharp.Parser.Parser CodeParser - { - get - { - global::CppSharp.Parser.Parser __result0; - if (((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser == IntPtr.Zero) __result0 = null; - else if (global::CppSharp.Parser.Parser.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser)) - __result0 = (global::CppSharp.Parser.Parser) global::CppSharp.Parser.Parser.NativeToManagedMap[((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser]; - else __result0 = global::CppSharp.Parser.Parser.__CreateInstance(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser); - return __result0; - } - - set - { - ((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance; - } - } - public uint DiagnosticsCount { get 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 af3d462d..5aa9ad3d 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 @@ -17898,53 +17898,6 @@ namespace CppSharp User = 4 } - public unsafe partial class Parser - { - [StructLayout(LayoutKind.Explicit, Size = 0)] - public partial struct __Internal - { - } - - public global::System.IntPtr __Instance { get; protected set; } - - protected int __PointerAdjustment; - internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary(); - protected void*[] __OriginalVTables; - - protected bool __ownsNativeInstance; - - internal static global::CppSharp.Parser.Parser __CreateInstance(global::System.IntPtr native, bool skipVTables = false) - { - return new global::CppSharp.Parser.Parser(native.ToPointer(), skipVTables); - } - - internal static global::CppSharp.Parser.Parser __CreateInstance(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false) - { - return new global::CppSharp.Parser.Parser(native, skipVTables); - } - - private static void* __CopyValue(global::CppSharp.Parser.Parser.__Internal native) - { - var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.Parser.__Internal)); - *(global::CppSharp.Parser.Parser.__Internal*) ret = native; - return ret.ToPointer(); - } - - private Parser(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false) - : this(__CopyValue(native), skipVTables) - { - __ownsNativeInstance = true; - NativeToManagedMap[__Instance] = this; - } - - protected Parser(void* native, bool skipVTables = false) - { - if (native == null) - return; - __Instance = new global::System.IntPtr(native); - } - } - public unsafe partial class CppParserOptions : IDisposable { [StructLayout(LayoutKind.Explicit, Size = 320)] @@ -18818,7 +18771,7 @@ namespace CppSharp public unsafe partial class ParserResult : IDisposable { - [StructLayout(LayoutKind.Explicit, Size = 56)] + [StructLayout(LayoutKind.Explicit, Size = 48)] public partial struct __Internal { [FieldOffset(0)] @@ -18833,9 +18786,6 @@ namespace CppSharp [FieldOffset(40)] internal global::System.IntPtr library; - [FieldOffset(48)] - internal global::System.IntPtr codeParser; - [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser12ParserResultC2Ev")] @@ -19017,24 +18967,6 @@ namespace CppSharp } } - public global::CppSharp.Parser.Parser CodeParser - { - get - { - global::CppSharp.Parser.Parser __result0; - if (((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser == IntPtr.Zero) __result0 = null; - else if (global::CppSharp.Parser.Parser.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser)) - __result0 = (global::CppSharp.Parser.Parser) global::CppSharp.Parser.Parser.NativeToManagedMap[((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser]; - else __result0 = global::CppSharp.Parser.Parser.__CreateInstance(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser); - return __result0; - } - - set - { - ((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance; - } - } - public uint DiagnosticsCount { get 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 3e452bed..3f7e65dc 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 @@ -17898,53 +17898,6 @@ namespace CppSharp User = 4 } - public unsafe partial class Parser - { - [StructLayout(LayoutKind.Explicit, Size = 0)] - public partial struct __Internal - { - } - - public global::System.IntPtr __Instance { get; protected set; } - - protected int __PointerAdjustment; - internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary(); - protected void*[] __OriginalVTables; - - protected bool __ownsNativeInstance; - - internal static global::CppSharp.Parser.Parser __CreateInstance(global::System.IntPtr native, bool skipVTables = false) - { - return new global::CppSharp.Parser.Parser(native.ToPointer(), skipVTables); - } - - internal static global::CppSharp.Parser.Parser __CreateInstance(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false) - { - return new global::CppSharp.Parser.Parser(native, skipVTables); - } - - private static void* __CopyValue(global::CppSharp.Parser.Parser.__Internal native) - { - var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.Parser.__Internal)); - *(global::CppSharp.Parser.Parser.__Internal*) ret = native; - return ret.ToPointer(); - } - - private Parser(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false) - : this(__CopyValue(native), skipVTables) - { - __ownsNativeInstance = true; - NativeToManagedMap[__Instance] = this; - } - - protected Parser(void* native, bool skipVTables = false) - { - if (native == null) - return; - __Instance = new global::System.IntPtr(native); - } - } - public unsafe partial class CppParserOptions : IDisposable { [StructLayout(LayoutKind.Explicit, Size = 248)] @@ -18818,7 +18771,7 @@ namespace CppSharp public unsafe partial class ParserResult : IDisposable { - [StructLayout(LayoutKind.Explicit, Size = 56)] + [StructLayout(LayoutKind.Explicit, Size = 48)] public partial struct __Internal { [FieldOffset(0)] @@ -18833,9 +18786,6 @@ namespace CppSharp [FieldOffset(40)] internal global::System.IntPtr library; - [FieldOffset(48)] - internal global::System.IntPtr codeParser; - [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser12ParserResultC2Ev")] @@ -19017,24 +18967,6 @@ namespace CppSharp } } - public global::CppSharp.Parser.Parser CodeParser - { - get - { - global::CppSharp.Parser.Parser __result0; - if (((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser == IntPtr.Zero) __result0 = null; - else if (global::CppSharp.Parser.Parser.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser)) - __result0 = (global::CppSharp.Parser.Parser) global::CppSharp.Parser.Parser.NativeToManagedMap[((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser]; - else __result0 = global::CppSharp.Parser.Parser.__CreateInstance(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser); - return __result0; - } - - set - { - ((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance; - } - } - public uint DiagnosticsCount { get 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 b958e6c9..553c850e 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 @@ -17899,53 +17899,6 @@ namespace CppSharp User = 4 } - public unsafe partial class Parser - { - [StructLayout(LayoutKind.Explicit, Size = 0)] - public partial struct __Internal - { - } - - public global::System.IntPtr __Instance { get; protected set; } - - protected int __PointerAdjustment; - internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary(); - protected void*[] __OriginalVTables; - - protected bool __ownsNativeInstance; - - internal static global::CppSharp.Parser.Parser __CreateInstance(global::System.IntPtr native, bool skipVTables = false) - { - return new global::CppSharp.Parser.Parser(native.ToPointer(), skipVTables); - } - - internal static global::CppSharp.Parser.Parser __CreateInstance(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false) - { - return new global::CppSharp.Parser.Parser(native, skipVTables); - } - - private static void* __CopyValue(global::CppSharp.Parser.Parser.__Internal native) - { - var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.Parser.__Internal)); - *(global::CppSharp.Parser.Parser.__Internal*) ret = native; - return ret.ToPointer(); - } - - private Parser(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false) - : this(__CopyValue(native), skipVTables) - { - __ownsNativeInstance = true; - NativeToManagedMap[__Instance] = this; - } - - protected Parser(void* native, bool skipVTables = false) - { - if (native == null) - return; - __Instance = new global::System.IntPtr(native); - } - } - public unsafe partial class CppParserOptions : IDisposable { [StructLayout(LayoutKind.Explicit, Size = 320)] @@ -18819,7 +18772,7 @@ namespace CppSharp public unsafe partial class ParserResult : IDisposable { - [StructLayout(LayoutKind.Explicit, Size = 56)] + [StructLayout(LayoutKind.Explicit, Size = 48)] public partial struct __Internal { [FieldOffset(0)] @@ -18834,9 +18787,6 @@ namespace CppSharp [FieldOffset(40)] internal global::System.IntPtr library; - [FieldOffset(48)] - internal global::System.IntPtr codeParser; - [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="??0ParserResult@CppParser@CppSharp@@QEAA@XZ")] @@ -19018,24 +18968,6 @@ namespace CppSharp } } - public global::CppSharp.Parser.Parser CodeParser - { - get - { - global::CppSharp.Parser.Parser __result0; - if (((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser == IntPtr.Zero) __result0 = null; - else if (global::CppSharp.Parser.Parser.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser)) - __result0 = (global::CppSharp.Parser.Parser) global::CppSharp.Parser.Parser.NativeToManagedMap[((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser]; - else __result0 = global::CppSharp.Parser.Parser.__CreateInstance(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser); - return __result0; - } - - set - { - ((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance; - } - } - public uint DiagnosticsCount { get diff --git a/src/CppParser/CppParser.cpp b/src/CppParser/CppParser.cpp index d4ab7263..aab12178 100644 --- a/src/CppParser/CppParser.cpp +++ b/src/CppParser/CppParser.cpp @@ -36,7 +36,6 @@ DEF_VECTOR_STRING(CppParserOptions, SupportedStdTypes) ParserResult::ParserResult() : ASTContext(0) , library(0) - , codeParser(0) { } @@ -45,12 +44,10 @@ ParserResult::ParserResult(const ParserResult& rhs) , Diagnostics(rhs.Diagnostics) , ASTContext(rhs.ASTContext) , library(rhs.library) - , codeParser(rhs.codeParser) {} ParserResult::~ParserResult() { - delete codeParser; } ParserDiagnostic::ParserDiagnostic() {} diff --git a/src/CppParser/CppParser.h b/src/CppParser/CppParser.h index 549aedac..2b3c9309 100644 --- a/src/CppParser/CppParser.h +++ b/src/CppParser/CppParser.h @@ -75,8 +75,6 @@ enum class ParserResultKind FileNotFound }; -class Parser; - struct CS_API ParserResult { ParserResult(); @@ -88,7 +86,6 @@ struct CS_API ParserResult CppSharp::CppParser::AST::ASTContext* ASTContext; NativeLibrary* library; - Parser* codeParser; }; enum class SourceLocationKind diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index 8e7bc3bc..7e917a75 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -3958,10 +3958,11 @@ void Parser::HandleDiagnostics(ParserResult* res) } } -ParserResult* Parser::ParseHeader(const std::vector& SourceFiles, ParserResult* res) +ParserResult* Parser::ParseHeader(const std::vector& SourceFiles) { assert(opts->ASTContext && "Expected a valid ASTContext"); + auto res = new ParserResult(); res->ASTContext = lib; if (SourceFiles.empty()) @@ -4214,8 +4215,9 @@ ParserResultKind Parser::ReadSymbols(llvm::StringRef File, return ParserResultKind::Success; } -ParserResult* Parser::ParseLibrary(const std::string& File, ParserResult* res) +ParserResult* Parser::ParseLibrary(const std::string& File) { + auto res = new ParserResult(); if (File.empty()) { res->kind = ParserResultKind::FileNotFound; @@ -4268,9 +4270,8 @@ ParserResult* ClangParser::ParseHeader(CppParserOptions* Opts) if (!Opts) return nullptr; - auto res = new ParserResult(); - res->codeParser = new Parser(Opts); - return res->codeParser->ParseHeader(Opts->SourceFiles, res); + Parser Parser(Opts); + return Parser.ParseHeader(Opts->SourceFiles); } ParserResult* ClangParser::ParseLibrary(CppParserOptions* Opts) @@ -4278,9 +4279,8 @@ ParserResult* ClangParser::ParseLibrary(CppParserOptions* Opts) if (!Opts) return nullptr; - auto res = new ParserResult(); - res->codeParser = new Parser(Opts); - return res->codeParser->ParseLibrary(Opts->libraryFile, res); + Parser Parser(Opts); + return Parser.ParseLibrary(Opts->libraryFile); } ParserTargetInfo* ClangParser::GetTargetInfo(CppParserOptions* Opts) diff --git a/src/CppParser/Parser.h b/src/CppParser/Parser.h index 3f94eb93..90695ec5 100644 --- a/src/CppParser/Parser.h +++ b/src/CppParser/Parser.h @@ -49,8 +49,8 @@ public: Parser(CppParserOptions* Opts); void Setup(); - ParserResult* ParseHeader(const std::vector& SourceFiles, ParserResult* res); - ParserResult* ParseLibrary(const std::string& File, ParserResult* res); + ParserResult* ParseHeader(const std::vector& SourceFiles); + ParserResult* ParseLibrary(const std::string& File); ParserResultKind ParseArchive(llvm::StringRef File, llvm::object::Archive* Archive, CppSharp::CppParser::NativeLibrary*& NativeLib);